# All Questions

103 views

### MapThread (or alternative) for adding fixed option

I currently use MapThread[f, {{a1, a2}, {b1, b2}] for obtaining { f[a1, b1], f[a2, b2] }. Is there a version (or alternative) ...
377 views

### Finding uniformly distributed random points on an ellipsoid

I am trying to generate a poincare map for a system whose reduced energy manifold looks like the following surface. (x/a)^2 +(y/b)^2 +(z/c)^2=1 I want to find a ...
212 views

### Exporting pdf with a precise page dimension in metric units, rather than printer points

Mathematica uses a screen resolution of 72 dpi. For post-processing figures I use Corel, which conveniently allows me to use metric units (mm) for positioning and resizing figures. Say, I want to ...
65 views

### Can I name a variable as D(1,0,+1/2)? [closed]

I am trying to use variables with names as D(0,0,0), D(1,1/2,+1/2), etc. but I don't know how to do it.
158 views

### Paired Bar Chart with negative values

Dear Mathematica group I want to plot negative values using PairedBarChart in V9 However, with this code ...
140 views

### Phase Portrait Trajectories

How do I make a phase portrait which looks like the ones demonnstrated here? Not the fancy version where I can use the controls to change it, just a screen-shotted version of say a spiral point? Any ...
128 views

### 3D Plot for Attractive and Repuslive Field Functions [closed]

I am using Mathematica to plot the total potentials (which is the sum of an attractive potential field and a repulsive potential field) - This is related the Artificial Potential Field Method in ...
167 views

### How to put triangle graphics on a plot of two seperate related lists?

For 7 different discharge energies, I have two gases (1. pure helium, 2. a helium oxygen mixture) being heated up. Those 14 settings then enter a tube, in which the system cools off. In the list below,...
193 views

### How to rewrite the rules in a list when they satisfy a given condition

I think the best way to state my problem is to illustrate it with an example. Assume I have the following toy-list of rules: ...
228 views

### Built in function without Attributes Listable works as if it has Attributes Listable

Can Built-in function works as if it has Attributes Listable even if it doesn't have that ...
256 views

### GeoGraphics examples not running correctly

I'm trying to work with the new GeoGraphics functionality in Mathematica 10, starting with the example given here. None of the code seems to run well for me, though. I try to run the first command: <...
115 views

### Optimizing complex functions

I am trying to optimize a function containing complex numbers, however I keep running into errors. Consider the simple optimization problem: ...
179 views

### Generating $\mathbb{Z}^*_n$

I'm using Mathematica to illustrate basic number theory concepts in a graduate cryptography class. To generate elements of the multiplicative group of integers modulo $n$, i.e. $\mathbb{Z}^*_n$, I can ...
66 views

### Weird results of calculating a sum of binomials?

In[1]:= Sum[(-1)^k*Binomial[n, k]*Binomial[k, j], {k, 0, n}] Out[1]= (j Binomial[0, j])/(j - n) According to this output, for any ...
287 views

### Calculating eigenvalues of a large matrix takes a long time

I have a tridiagonal matrix (1000×1000) with each element equal to $1$ except {n, n} = 2. It takes 8 hours to give me the eigenvalues?!! Here is the code I used: <...
279 views

### Finding the equation of tangent lines where a function has a specified slope [closed]

A function is defined as f[x_] := 3x^4 + 8x^3 - 24x^2 - 48x + 19 I need to find the equation of the tangent lines at the points where the tangent line has a ...
108 views

### ParallelMap not using all of the available kernels

Please note: I cannot provide the code here, since the project is far too big to post at any Internet forum. I have a computer with eight logical cores. I have Mathematica Version 10.0.2, and I am ...
54 views

### how to write out this equation on Mathematica? [closed]

I have this equation that my manager would like to use on Mathematica, but I've only been learning how to use Mathematica for a few hours. I need to solve for Ax and also plot a graph. Please help....
168 views

### Missing elements using FinancialData

I have a list of stock symbols which I selected with FinancialData["Menbers"] that looks like the following list: ...
209 views

### Matrix of boundary distance between countries

I'm trying to generate a matrix of the boundary distances between all countries. First thing I tried was GeoDistance: ...
226 views

### Extract data pairs from a list of associations?

I am starting to use the new Associations, so this maybe an easy question, but I haven't figured it out. I have a list of associations, like: ...
59 views

### Simplify CubeRoot of meter cubes

Why Mathematica doesn't simplify CubeRoot of meter cubes to meters? r = Quantity[10, "Meters"]; v = 4/3 r^3 Pi; CubeRoot[% * 3/4 / Pi] returns ...
148 views

### Drawing a pair of lines to the x-axis and y-axis from a point along a curve

I have some plot like the following: Plot[Cos[x], {x, -10, 10}, AxesLabel -> {Style["x-axis", 12], Style["y-axis", 12]}, ImageSize -> {650, 650}] I'd like ...
56 views

### How can I modify text in a Graphics produced by Plot?

I have a Plot in a cell of a Mathematica notebook. The Plot was made with data that I no longer have. I want to modify the label of one of the axes, without running the plot command again (since I don'...
51 views

### How to evaluate Poisson Bracket? [closed]

I'am new in Mathematica so please don't yell at me. I want to define Poisson Bracket in Mathematica 9 and evaluate it for two functions,but it didn't worked. Could you help me please? ...
321 views

### Inline documentation of “Properties”

Context I find the documentation has become a bit of a maze, in particular given the more recent convention of having keywords has strings rather than Mathematica Keywords. For instance, ...
412 views

### how to use InputField function within the manipulate function

I am trying to make a demonstration that can take in a matrix and create a vector field. Currently I have the demonstration all functioning but to define the matrix it uses sliders. I know they cannot ...
145 views

### How does Grid operate on Dataset?

The documentation (10.0.2) indicates that Grid can be used to display a Dataset; the section in guide/ComputationWithStructuredDatasets labelled 'Dataset Presentation'. However simply invoking Grid[...
180 views

### How to combine the elements of two lists using a user-specified function

I have two lists of integers. From these lists I want to produce a list where each element is a fraction derived from a corresponding pair of elements in the original lists, the smaller integer of the ...
1k views

### Combining 2D slices into a 3D plot

I am currently trying to combine several 2D plots into one big 3D plot. The 2D-plots are simply input-results from calculations (so these things have 2D coördinates (x,y)). The results depend on an ...
456 views

### Simulate random data with correlation

I would like to simulate some random data e.g. between 0 and 1, but with a given correlation. In other words some data where the correlation between two datasets is e.g. a constant or within a give ...
174 views

### Extracting numerical coefficients from an expression

I have very large expression and I want to extract and sum up all the numerical coefficients which multiply the summands. For example, expr = x + 2*y + 3*z*w ...
221 views

### Manipulating elements of a matrix, to loop or not ?

I have a grid of values generated from a MATLAB evaluation. Most of these elements are 0, some 0.5 and the remainder 1. I'd like to write a mathematica script which reads in the CSV and then, in every ...
86 views

### ListAnimate for nested lists with two sliders

I have a very complicated function of three variables (a,b,c). Now I want to plot the function value as a function of a while ...
197 views

### Getting Mathematica 9 to export text and axes of a plot as vector graphics in SVG

Minimal working example: ...
245 views

### Incorporate error bars to best-fit curve [closed]

I have managed to get mathematica to perform a best fit curve. However, I wish to add error bar to the curve, how do I do so?
107 views

### ParallelMap doesn't work with an Association. Is this a bug?

I receive a ParallelCombine::nopar1 error when executing ParallelMap[Identity, <|1 -> 1, 2 -> 2|>] Is this an ...
168 views

### How to implement the dual Lagrange?

I have seen in the Pang book of data mining the following example: ...
64 views

### UnitConvert of a Quantity whose value is a function of a Quantity

I am having trouble with UnitConvert when the QuantityMagnitude contains an embedded Quantity...
139 views

### The case of the disappearing locators

I have a complicated Manipulate that uses multiple locators, and need to document the output by saving the graphics to a file. The problem is that when I try to save the graphics, the locators ...
176 views

### How to use ContourPlot3D with a constraint

I want to draw $$G=G(P,T)=-k*T(1+\log{\frac{(V-1)T^{3/2}}{\Phi}})-\frac{a}{V}+P*V$$ but $V$ is an implicit function of $P$ and $T$, which is $(P+\frac{a}{V^2})(V-b)=k*T$ I tried to solve for $V$ ...
200 views

### Area of Self-Intersecting Polygon with Repeated Vertices

So Mathematica uses an even-odd rule for self-intersecting polygons, both when rendering them and when calculating their area: ...
188 views

### How to obtain Laurent series coefficients of an (almost) arbitrary function?

I have observed that Series in Mathematica assumes that the given function is smooth in the point around which one wants to perform series expansion. For instance: ...
278 views

### Why does cropping an image improve TextRecognize so much?

I am trying to use the TextRecognize function to extract data from certain screenshots. This is already a cropped version. Using TextRecognize on this yields <...
114 views

### Abs[Sin[4a]] not equal to 2Sin[2a]Abs[Cos[2a]] for a in [0,\pi/2]

I have a long expression which is not fully simplified because Abs[Sin[4a]] is considered different from 2Sin[2a]Abs[Cos[2a]] ...
332 views

### PlotLegends for ListPlot with more than 15 curves?

fixed in 10.1 (windows) I'm running into trouble getting the right PlotMarkers in the legend of a ListPlot of many curves. ...
73 views

### How to change list to a list of points

I have a list of angles {a1, a2, .... , an} and I would like to have a list of points ...
164 views

### Change the colors of individual atoms in a .mol or XYZ file

Similar to (Changing the atom color for plotting xyz-files), I want to take a molecule and then simply change the colors of individual atoms. I don't want to change all atoms of a type to a color (say,...