3
votes
2answers
2k 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 ...
6
votes
1answer
216 views

How to make InputTable

There is InputField in mma but how to make InputTable? In MathCAD it`s possible to insert Excel spreadsheet with input and output variables.Input variables I use for filling of header row and column ...
13
votes
3answers
396 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 ...
3
votes
2answers
245 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 ...
4
votes
1answer
150 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 ...
7
votes
0answers
223 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 ...
10
votes
2answers
217 views
11
votes
4answers
467 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 ...
3
votes
2answers
275 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 ...
-2
votes
1answer
292 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 ...
9
votes
2answers
364 views
3
votes
2answers
551 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 ...
8
votes
2answers
342 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: ...
32
votes
6answers
1k 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 ...
2
votes
2answers
172 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 ...
1
vote
1answer
189 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 ...
1
vote
1answer
152 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. ...
4
votes
3answers
180 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 ...
7
votes
1answer
217 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 ...
2
votes
1answer
67 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. ...
19
votes
4answers
587 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 ...
1
vote
0answers
156 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 ...
2
votes
3answers
640 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 ...
2
votes
1answer
103 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: ...
13
votes
5answers
488 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 ...
1
vote
2answers
308 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 ...
1
vote
2answers
127 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 ...
4
votes
3answers
2k views

How can I plot the complex graph of $x^x$ in Mathematica? [duplicate]

Possible Duplicate: How to plot imaginary part of a function Plotting Complex Quantity Functions For example, this Wolfram Alpha query shows this graph: But it does not show the code for ...
1
vote
1answer
563 views

How to solve a differential equation of nonhomogeneous fourth order real variable complex function with Mathematica? [closed]

Recently, I was got in trouble in solving a fourth order differential equation with Mathematica. And it is written like: $$ ...
1
vote
1answer
371 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 ...
10
votes
0answers
138 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 ...
4
votes
2answers
374 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 ...
9
votes
2answers
2k 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 ...
2
votes
2answers
211 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: ...
10
votes
5answers
573 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: ...
7
votes
3answers
925 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: ...
4
votes
4answers
2k 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 ...
4
votes
2answers
453 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 ...
4
votes
1answer
319 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 ...
5
votes
2answers
382 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 ...
3
votes
1answer
271 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 ...
0
votes
1answer
520 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: ...
2
votes
1answer
406 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 ...
9
votes
2answers
160 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 ...
13
votes
2answers
1k 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: ...
9
votes
1answer
232 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 ...
2
votes
1answer
145 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 ...
11
votes
5answers
944 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 ...
5
votes
3answers
484 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 ...
16
votes
2answers
996 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 ...

15 30 50 per page