# All Questions

67,824 questions
Filter by
Sorted by
Tagged with
715 views

### How to make a notebook that will be window maximized when open?

I use CreateDocument[cells, opts] to create a notebook. When the notebook is open, it has a small default windows size and I need to manually maximize it every ...
603 views

### How can I compute the representation matrices of a point group under given basis functions?

Take the $C_{3v}$ point group for example: ...
2k views

### How to make a Line[] with no end?

I'm trying to do this: In this graph, the secant points are aproximated in order to become the tangent, it seems I need some kind of function which plots a line based on two points and it's points ...
911 views

### Representation of negative exponents [duplicate]

Possible Duplicate: Way to improve “show me this decimal number to M places, don't use scientific notation”? How can I expand e.g. number 1.*10^-8 so that there would be no ...
421 views

### Perimeter and area are positive integers

In Geometry 3D, How can I find the vertices with integer coordinates of a triangle whose perimeter and area are positive integers with Mathematica? Suppose its vertices $(x,y,z)$ has coordinates ...
1k views

...
1k views

### Is there a way to get user input when running a script on a Linux terminal?

I have access to a node of a Linux cluster, on which Mathematica is installed. However, I do not have access to a Linux GUI. Typically I write and test Mathematica scripts on my Windows personal ...
790 views

### Generating a position lookup function for an arbitrary list of integers

In my code, I generate a list of integers called numlist. Here is an example numlist: ...
4k views

### Find zero crossing in a list

I'm looking for a function that finds the index of the zero-crossing points of a list. Before I go making my own subroutine to do this, I was wondering if anyone knows of any built-in Mathematica ...
264 views

### Import[] bug (video)?

I have the following code: frames = Import["myvideo.avi",{"Frames",{50,60,70}}]; This imports frames 1,2, and 3 of the video, not 50,60 and 70. It imports the ...
344 views

### Not able to load the package in CDF

I am facing a problem in loading the package. My code is working in Mathematica but after deploying it into CDF, it is unable to ...
223 views

### Controlling CDF window size

I want to ask how can I control the CDF WindowSize in such a way that the end user can minimise its size upto some extent only. ...
238 views

### Is it possible to replicate the “magic” of OptionPatterns[] with DynamicModule's local variables?

Creating richer interactive interfaces that are generated by a DynamicModule invariably requires more complex data structures and in particular, a larger argument ...
595 views

### Confused by (apparent) inconsistent precision

$$e^{\pi \sqrt{163}} \approx 262537412640768743.99999999999925$$ E^(Pi Sqrt[163.0]) N[E^(Pi Sqrt[163.0]), 35] NumberForm[E^(Pi Sqrt[163.]), 35] returns <...
111 views

### Trigger autorunning when not supposed to

Recently I was trying to make something where one could vary the parameters and press play to see how the animation changed. However, when I tried running the code it would just start automatically. ...
2k views

### Sort strings by natural ordering

Is there an easy way to sort strings according to their natural ordering? For example a list of file names ...
452 views

### How to move differentation before the integral?

I have quite a lot expressions that need to be integrated after switching the integral sign with differentiation operator. The additional problem is that the bounds are dependent to one of the ...
3k views

### Finding eigenvalues of a $1500\times1500$ matrix

I need to find the eigenvalues of a $1500\times1500$ real symmetric matrix given by $A_{i,i+1}= A_{i+1,i}=-1$ and also $A_{1,N=1500}=-1$ (this is because of a periodic boundary condition used) and all ...
209 views

### How to prevent substitution?

I have a function: $\bar{u}:=u[t,x,y,z]$ (1) How do I prevent it from expanding and substituting in instructions like those following: $\partial _t {\bar u}$ (2) Thanks in advance EDIT: ...
3k views

### How are parameters evaluated for a Plot in Manipulate

I am trying to get my head around how Manipulate evaluates functions in a Plot. I have read the introduction to Manipulate, and introduction to Dynamic, but I still ...
544 views

### Piecewise function with a function as argument

I want to define a piecewise function, which has two arguments, one of which is a function of the other's piecewise argument. I am giving an example ...
197 views

### How can define a set of nested parameters

I would like to know how I to define a function with a nested set of parameters (or whatever you would like to call it). For example, how would I get the following function ...
13k views

### How can I plot the complex graph of $x^x$ in Mathematica?

For example, this Wolfram Alpha query shows this graph: But it does not show the code for plotting it in Mathematica. Plot[x^x, {x, -1, 1}] only plots the real ...
1k views

### Using previous two solutions as a start point in FindRoot

I need to solve a sequence of equations and I want the starting point of each new FindRoot to be the solution of the earlier FindRoot, increased or decreased by a a bit in the following way: Some ...
227 views

### Is there a convenient/automatic way of uploading a notebook into SE?

This post discusses how to streamline the other way - extracting code from a fragmented and longish SE answer but I imagine a two-way workflow like: Fashion an answer/question in an SE-templated ...
1k views

### How to fit one distribution to another?

I have a custom distribution created to model some experimental observations. While too complicated to include in this question, I can provide an example and some illustrations to convey a sense of it....
6k views

### How to get MATLAB data imported with the same dimensions?

I have some MATLAB image data with the following dimensions (output is from MATLAB): >> size(im) ans = 86 86 3 45 The data imports just fine ...
380 views

### How to output an expression as a Dot[] product

How to force Mathematica to output an expression such as $a1u1+a2u2+a3u3$ as a Dot product like this one: ...
927 views

### How to plot rectangles aligned by their center?

Supose I have a rectangle which area is $x^2$. In some cases I may not know what is the size of each side, for $x=12,$ we have several possibilites: ...
4k views

### Finding the number of solutions to a diophantine equation

I want to count total number of the natural solutions (different from 0) of the equation $2x + 3y + z = 100$, but don't know how. How can I calculate it using Mathematica? I tried: ...
6k views

### How to convert equation to vector (matrix) form?

How can I convert expression a1*u1+a2*u2+a3*u3 to the vector form of dot product A.U, where ...
922 views

### Clustering a bivariate data set with Mathematica

I need to partition a bivariate data set into predetermined "n" clusters and, at the same time, to fix the centroid position of each cluster. Is the ...
660 views

### Count sublists which match pattern

I have a list which looks like this: data={{12,0},{0,0},{20,1},{0,0}, {0,-1}}. Now I would like to count the number of sublists which: have both slots zero the ...
726 views

### Rotated text in “plot” cannot be copied to MS Word

When I add some text to a simple plot with drawing tools, the text cannot be copied and pasted out with the graphic itself to Microsoft Word. Do you know how to copy the manually added text out to ...
1k views

### Problem in RegionPlot3D

I tried to plot the region bounded by the three planes. This is supposed to give me a pyramid type of shape (actually two, but I am just taking one of them). The code is given by ...
983 views

### Plot 3D vector that is a function of one variable

I have a function, r[t], which is a piecewise function that generates a 3D vector. It looks like this: ...
868 views

### Problems with FindMinimum for Constrained Optimization

I am trying to define a simple optimization problem, arising from the discretization of a simple Optimal Control problem. The problem that results is essentially linear, with bilinearities only ...
210 views

### How can I build an inline documentation utility?

I often have a large function to which I add inline comments, but then I can't see the forest for the trees. How can I make a tool that extracts the comments and tokens within them to generate an ...
10k views

### Nested NIntegrate

Suppose that we have the given simple integral expression $$\int_{-5}^{5} x \int_{-\infty}^{x} e^{\int_{0}^{z} -y dy} dz dx$$ Writing this out in Mathematica we obtain: ...
471 views

### Docked Cell lesson chooser

I have a question about creating a docked cell that will let me choose files. This is just as much a "design" question as a Mathematica question. I'm a math teacher and I want to bundle a bunch of ...
187 views

### How to arrange elements of a list

A file consists out of (x,y,z) data and I need the z-values arranged like this: {{z[1],z[2],...z[idimx]},{z[idimx+1],z[idimx+2],...z[idimx*2]},{....}} With <...
9k views

### Best way to extract values from a list of rules?

Mathematica has a lot of list manipulation functions, and, also because I don't work with lists often, at times I'm a bit lost. I'll find a way, but I'm sure it's not the most efficient. Case in point,...
3k views

### Is it possible to typeset left and right angle brackets?

I would like to typeset the following in a Mathematica notebook: $$\langle P \rangle$$ Is it possible to typeset left and right angle brackets? In $\LaTeX$, they are given by ...
3k views

### What is the best way to create a correlation matrix heatmap with values?

This may have been asked somewhere else, but I couldn't find an answer by searching. I'm trying to create a correlation table that colors the background behind the numbers as a heatmap. I've been ...
3k views

### Fourier Transform of a Step Function

I'm trying to obtain the form of a sinc function that I know I'm supposed to get in Mathematica. I'm doing this because I intend to do a lot with Fourier transforms (FT) and I'd like to know I'm not ...
115 views

### Retain values between sessions [duplicate]

This is a real newbie question, so apologies in advance for may seem a very dumb question ... I'm trying to understand the various ways in which information can be retained in a notebook between ...
6k views

### Variables Inside Functions Not Evaluating

x = 5*y function1[y_] := x function1[5] Am I wrong in thinking that function1[5] should equal 25? Instead this comes out. ...
1k views

### Using Goto and Label in compiled function?

Below I post some rudimentary code to show that there is something wrong using Goto and Label commands in compiled functions (or I believe there is something wrong). It seems that the command Label is ...