# All Questions

248 views

### How to export plot legend independently?

Let us take an adapted example from Mathematica doc's: ...
89 views

### Importing Data Issue, Breaking Up Elements

I am trying to import a comma delimited text file as a Table and I am having two issues: First, the file imports all of the numbers that should be separate columns as a single string. This is not ...
465 views

### Why DSolve[] does not work?

I try to find the analytical solution to the ordinary differential equations as fellow: \frac{d^2 \theta}{d t^2} = \dfrac{-M\cos\theta\sin\theta(\frac{d\theta}{dt})^2 - ...
67 views

### Problem in computing Dsolve

I want to compute my result using Dsolve. The code is given below. ...
112 views

### Interactive level sets of polynomials

I'm new to Mathematica and I need some help with the following problem. I would like given some positive integer n, to have mathematica plot the level sets of a (say monic) polynomial of degree n, ...
98 views

### Computing the coefficients for Gaussian integral

I wrote a small script to find the Gaussian integral points and weights: ...
83 views

### Why doesn't Quantity accept a Dynamic expression as a second argument?

If anyone can help me with this, it would be greatly appreciated. I'm using the following code with the intent of using controls to easily input values and units: ...
81 views

### Loop and list all p-values

I have the following mathematica code (see below). Is there a way to iterate this approach in such a way to get the p-value results of each test in a list? I would like to get say 1000 p-values for ...
215 views

### Set conditions at a permutation

I need to find all permutations of 3 elements from {a,b,c,d,e} with this condition: These must include element d maximum once, ...
525 views

### Axis label shifted in 3D plot

Does anybody know why the axis label is shifted in this plot? Probably because of the different lengths of the labels of the ticks? How can I have the axis label in the middle of the axis? The code ...
153 views

### How to run code in a saved file when it is opened

I have a Mathematica file that I saved. In it, I have multiple functions that I've defined and have evaluated a number of the functions with different arguments. I would like to be able to open the ...
124 views

### HoldForm gives tick labels in Plot without multiplication sign

When plotting in Mathematica, HoldForm[-5*10^6] gives $-5\: 10^6$ as the label of the axis, i.e. without the multiplication sign. How can I get $-5*10^6$ as output? ...
92 views

### Defining a Function

I've been reading about functions in Mathematica and playing with this for hours, but I'm clearly missing something. The following code correctly calculates "fail", the number of failed scenarios. I ...
84 views

### Error from Compile with a sum over two indices

I have the following code: ...
118 views

### How to plot a finite number of vectors?

does anybody knows how can I plot one or two vectors? (I don't want to plot the vectorial field)? My target is to plot the electric field produced by a circle on a point and show how the point moves. ...
257 views

### copy and paste legend with plot [closed]

how can I copy and paste legend with the graph from Mathematica 10.0 to Word. i can copy and paste a graph from Mathematica to word, but legend does not get copied. how do I copy paste the legend ?
138 views

### Are variables always assumed to be real in Jordan Decomposition?

If you give the following input in Mathematica 9.0 (Student Edition): JordanDecomposition /@ ({{1, #}, {#, -1}} & /@ {i, I}) Mathematica gives you two ...
246 views

### Two, maybe related, issues with ParallelTable

I will use a very simple example for demonstrating two issues I face with ParallelTable, one with respect to the speed and one with respect to the use of memory. These issues might be related. Let us ...
128 views

### Dynamically change the ViewCenter location of a 3D graphics

I would like to be able to dynamically change the rotation pivot point location of a 3D graphics (in Mathematica terminology ViewCenter). In 3D CAD software, this ...
311 views

### how to combine a list of the prime factors

For example, there is a list of prime factors. {{2, 1}, {3, 2}, {43, 5}, {26684839, 1}} How to combine them to the number ...
73 views

### Fail to plot this implicit function [closed]

So I need to plot an implicit function and I used the following but ended up with an empty plot: ...
203 views

### Counting variable from a list of matrices

I have a list of matrices ...
627 views

### How to define the step size in plotting some graph in mathematica?

I want to plot some function . The code is given below. f = 10000000; v0 = 8.7; T = 1*(1/f); v[t] = v0*Sin[2*\[Pi]*f*t]; Plot[%, {t, 0, T} ] Now the plot will ...
103 views

### Cannot find a way to display an adjacency matrix [closed]

I have a question about face adjacency graphs. Suppose that I have an adjacency matrix How can I plot something like this?? I tried and it looks too messy. What may be the resulting graphic? Thank ...
49 views

### Plot with Epilog doesn't show up in Show [duplicate]

I start with: With[{r = 0.3, q = 10}, ans = NSolve[r u (1 - u/q) - u^2/(1 + u^2) == 0, u] ] Then: ...
248 views

### Overlapping Spheres with a Shared Blank Region

We have two similar overlapped spheres in a way that the distance between their centers is smaller than the sum of their radius (2R>a). As I show here: Also, we want to draw them in a such way that ...
47 views

### Unexpected order of evaluation in ForAll

I noticed that ForAll behaves rather unexpectedly when its first argument is a symbol which has been Set in an outer scope. For ...
104 views

### NSolve and Loop - getting error that does not occur with single instance

I am having difficulties getting this code to work. Code: ...
96 views

### Plot zero contour of a function of two variables [duplicate]

I have F[x_,y_] = f(x,y). I would like to solve (numerically) F[x,y] == 0 to give x as ...
226 views

### Out of memory problem on constructing large list in Mathematica running on Linux [closed]

I have Mathematica running on Mac as well as Linux, my Mac as 16GB of RAM with core i5 processor (2-core) and Linux has 24GB of RAM on i7 (4-core). The problem is that the following command: ...
129 views

### How do I manage my memory better when using the Map function?

So I'm attempting to write a Mathematica program that prints a range of natural numbers as the sum of four cubes. I wrote the following Mathematica code to try this, but am running into a memory ...
59 views

### How do you programmatically update a tag using the TaggingRules mechanism?

Consider the following simple front-end code: ...
94 views

### How to deal with Part in a function?

I need to iterate several functions such as {3 x[[1]]^2 + x[[2]], x[[2]], x[[3]]}, {Exp[x[[4]]], x[[2]], x[[3]], x[[4]]},etc. ...
182 views

### Black Scholes PDE solved by method of lines

I've been trying to solve the Black Scholes partial differential equation (BSPDE) by transforming it to the heat equation (HE) form and using method of lines (discretizing spatial argument and leaving ...
62 views

### generate a category bar with TemplateApply

Consider we are generating a category bar with 2 levels. This is an example about the XMLTemplate ...
229 views

### Select certain items from nested list

I have a list as follows: lis1={{{a1,b1,c1,d1,e1},{a2,b2,c2,d2,e2}}, {{a3,b3,c3,d3,e3},{a4,b4,c4,d4,e4}}} and would like to delete certain elements from it resp. ...
60 views

### Creating separate graphics

I am using the command lines: data = Import["file*.txt", "CSV"] ListLinePlot[data] to plot lists of points. As you can notice, my file name is ...
162 views

### FEM in Mathematica and AceGen [closed]

I just wanted to ask, if anybody has already worked with AceGen AceGen, Wolfram Research AceGen, Homepage and knows what clear advantages AceGen has compared to the new FEM in Mathematica 10 ...
70 views

### Interpreting Mathematica output or producing cleaner output

Could someone please explain what the following would look like in standard math notation (or explain to me what this means): ...
74 views

### How can I use private variables in different ways

How can I use some private variables/symbols in another sub contexts in different ways. Note: Please do not use code Cell Style for testing the codes. ...
112 views

### differential equation of order2

I want to solve the following differential equation ode = x*y''[x] + y'[x] + 4*x^2*(x^2 - 1) y[x] == 0 But do not know how to actually solve it. Any suggestion?
131 views

### Notebook vs. Kernel: Kernel giving inaccurate results

I am running a code on Mathematica (on Mac OS X) that takes high values for some of the variables. In Notebook, I set the global precision using the following code (which is well documented!) at the ...
435 views

### Plotting points from file

How can I plot points (for example {{1 , 1}, {3 , 7}, {5 , 5}}) having as an input a file which contains the points coordinates ? And is there any way to draw a ...
189 views

### Video stabilization: extracting the transformation rules used by ImageAlign

Imagine that I have a real life video, with all the artefacts coming from real life, and also from video compression, etc, and that I can edit this video, with filters and cropping, in such a way that ...
90 views

### Manipulation of .csv imported data — no blanks in either of two lists

Above is a .csv file. I am trying to construct two lists of male and female math test scores such that only districts which include info for both male and female students are included i.e. neither ...
226 views

### Calculate the total length of line segments within polygon

So we have a polygon with N vertices located on grid. All vertices are located at the intersection of cells (so their coordinates are integers). The objective is to calculate the total length of line ...
117 views

### Computing a recurrence table backward

I am trying to understand how to compute a recursive equation backward say n = 10 to n = 1. I am trying to solve a PDE for which ...
56 views

### Undesired resizing with ImageMultiply and Masking

I want to systematically measure image intensity around each of the points in this 256x256 image. i0: I already have centroid locating code to figure out the centers of each of these points. To ...
85 views

### Take sublist with fixed interval

For example: a = Range[20]; a = ArrayReshape[a, {4, 5}] I want to take elements from a with interval = 2 : ...
78 views

### NIntegrate producing SetDelayed::write message [closed]

I used NIntegrate to calculate an integral with the final limit as a variable, which later will be listed in a table, ...

15 30 50 per page