# All Questions

4answers
3k views

### Can one force a linear regression fit to go through the origin?

As the question says, can one force a fit through the origin $(0,0)$ as one can when fitting a trendline to your data in MS Excel? If so, how do you do that?
1answer
203 views

### What is the purpose of Dump contexts?

Motivation I've been trolling through some internal code, trying to glean design practices WRI developers employ when extending Mathematica using top-level code. During my ...
1answer
523 views

### Degree Symbol missing in PolarPlot when exported to PDF

I am trying to produce a polar plot. The axis should be in degrees. While no error occurs, the pdf export isn't working properly. Instead of the degree symbol I get ...
0answers
206 views

### Changing scroll rate for page down key?

I have a presentation remote that allows me to advance Mathematica slides when in the SlideShow environment. The control sends a page down key. Some of my slides extend below the screen window, and ...
4answers
629 views

### How to define and use a linear function

I have the following equation $T = -800n + 12000$. I know that this is a linear function and that the two points $(0, 12000)$ and $(15,0)$ lie on the line. When I have 2 other values of n between 0 ...
4answers
280 views

### How can I get the value of a at “t=2.4985352432136567” in the following expression?

By running the following code: ...
1answer
803 views

### Import file from FTP site

I would like to Import files from an FTP site. The code below works on a test site: file = Import["ftp://test:test@ftp.secureftp-test.com/pigs.xml"]; But when I ...
2answers
364 views

### 3D Plot: Number of Roots in x of a polynomial in x, a, b and c

I have a polynomial in four variables x,a,b and c. The number of roots of the polynomial in x depends of the choice of a, b and c. I would like to have a 3D-Plot with a, b and c on the axes, while the ...
2answers
4k views

### How do I plot $x^2+y^2=1$ in 3D?

How would I plot $x^2+y^2=1$ in 3D (it would form a cylinder)? Since there is no $z$ in the equation, I can't solve for it and use Plot3D. Or can I just put the ...
1answer
273 views

### How to make InputTable

There is InputField in mma but how to make InputTable? In MathCAD its possible to insert Excel spreadsheet with input and output variables.Input variables I use for filling of header row and column ...
4answers
557 views

### Accessing Reduce from DSolve

When solving transcendental equations, Solve frequently warns us that inverse functions are being used so that some solutions may not be found. We also see that ...
2answers
279 views

### Find all points that have the same minimum? [duplicate]

Possible Duplicate: How to find all the local minima/maxima in a range Sin[x] have two points ($3\pi/2,7\pi/2$) where the same minimum ($-1$) is achieved ...
1answer
196 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 ...
0answers
250 views

### Using Compile to speed up Function with PermutationProduct

I have the following fairly simple routine dot involving PermutationProduct that I wish to speed up using ...
2answers
237 views

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

Take the $C_{3v}$ point group for example: ...
4answers
624 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 ...
2answers
400 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 ...
1answer
318 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 ...
3answers
580 views

...
2answers
698 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 ...
2answers
456 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: ...
6answers
2k 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 ...
2answers
189 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 ...
1answer
237 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 ...
1answer
175 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. ...
3answers
196 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 ...
1answer
284 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 ...
1answer
80 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. ...
4answers
837 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 ...
0answers
178 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 differentation operator. The additional problem is that the bounds are dependent to one of the ...
3answers
935 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 ...
1answer
116 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: ...
5answers
807 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 ...
2answers
387 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 ...
2answers
148 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 ...
3answers
3k 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 ...
1answer
502 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 ...
0answers
156 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 ...
2answers
467 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 ...
2answers
3k 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 ...
2answers
262 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: ...
5answers
683 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: ...
3answers
1k 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: ...
4answers
3k 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 ...
2answers
542 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 ...
1answer
459 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 ...
2answers
493 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 ...
1answer
402 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 ...
1answer
622 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: ...
1answer
518 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 ...

15 30 50 per page