# All Questions

66 views

### How can I include a popup menu in my wizard's content?

I'm trying to create a wizard that enables the user to choose between different shaft components. At the same time, I need a flag to be 1 if he chooses a bearing and 0 otherwise. I extended the ...
299 views

### Different colors for nodes in tree plot

I have some list of numbers which I am plotting using TreePlot. This is the code: ...
200 views

### Import multiple files from folder in order of date added

I have a folder that contains certain files I want to import. In my case those are .png files. As all the files I want to import contain the phrase "accum" in their filenames, I can use ...
77 views

### ImageCapture on Windows 8.1 [closed]

I have an Asus SmartTab tablet with Mathematica 9 on it. When I run ImageCapture, nothing shows up in the image window. Originally running this completely crashed ...
187 views

### Why does Arrow not work well with Scaled coordinates in 3D?

I am a little puzzled by the fact that if I try to use Arrow with Scaled coordinates in 3 dimensions the arrowheads are all over ...
200 views

### How can I get this Graphics3D to rotate around a particular sphere?

I made this Graphics3D of the Sun with the plotted orbits of a few astronomical objects. ...
82 views

### Document Creation: inserting a grid

This question is strongly related to: NotebookWrite Cell with Grid Let’s create sample chart ...
29 views

### Is there a way to convert InlineCell to InputForm once and for all?

After asking a question about making InlineCell similar to Input, I realized that by typing Shift+Ctrl+I I really can manually convert every InlineCell to InputForm. So my new question is: Is there a ...
233 views

### If doesn't compile if its output is the output of Compile?

The smallest sample I can find to reproduce this problem is: test = Compile[{}, If[True, 1]]; << CompiledFunctionTools` CompilePrint@test ...
356 views

### Measuring curve length on a binarized image

With the help of almighty Mathematica 9, I got from this To this: with this code: ...
50 views

### Export Messing Up Alignment of Bar Chart

Here is my code: ...
189 views

### ContourPlot refuses to show in-figure PlotLegends after turn on ContourShading

I would like to do a contour plot with a label inside the figure. For example, the following works well. Note there is a small "example" at the right bottom figure. ...
44 views

### How to get integer/rational and real eigenvectors to be the same? [duplicate]

forgive me if I missed this already being answered or too easy. Given a matrix: q = {{1, 3, 5}, {7, 11, 13}, {1/3, 1/7, 1/13}}; Eigenvectors are different here: ...
967 views

### Filling a curve between a line and the x-axis

I'm trying to plot the function $f(x)=\dfrac{1}{x^2}$, filling the square area from (0,0) to (1,1) with purple and filling the area under the curve from 1 to 4 with red. However, Mathematica is not ...
88 views

### How can I make a stylesheet where inline cells have are styled like input cells?

How can I make a stylesheet where inline cells have are styled like input cells? By "similar", I mean the same font and syntax highlighting. I have even tried copying all settings from ...
122 views

### Few quick Mathematica questions about Dictionary

a. Get the list whose elements are of the form {language,number of words in dictionary) I tried this, and it gave me the number if words in dictionary, but I don't know how to get the language part: ...
375 views

### Using KalmanFilter or KalmanEstimator

I have the following: ...
55 views

### Help with Reduce, quadratic system of inequalities

I'm trying to obtain an equivalent system of inequalities to the one below but without the variables x and z. Somehow Reduce just repeats the command. ...
121 views

### SplicedDistribution - different definition across Mathematica 9?

I am having troubles with my notebook. I succesfully defined Asymmetric Laplace Distribution at school using SplicedDistribution function, and Mathematica was able ...
154 views

### How to specify the centre or PlotRange of a Graphics3D?

When I create a Graphics3D, I often want to place an object right at the centre of the box. Initially I thought that the centre was specified by ...
270 views

### Bizarre behavior of With, Compile and Break

I'm guessing this is almost certainly a bug in Compile (because they're fairly common), but it's pretty weird and I spent about an hour tracking down the issue and ...
153 views

### RSolve fails on a two-equation non-linear system

I have a system of just two recurrence equations, I need to solve them and so I use RSolve: ...
159 views

### Determining the dimension of a probability distribution

Functions like Mean and RandomVariate clearly infer the dimension of the distribution passed to them. One can also usually ...
106 views

### complicated Numerical Integration, FEM application

I am trying to calculate a 2d Integral which has another 2d integral in the integrands. here is the setup: ...
111 views

### Mathematica function Det has unexpected behavior

I am using Mathematica "Kernel" -> {"Version" -> "9.0 for Microsoft Windows (64-bit) (January 25, 2013)", "ReleaseID" -> "9.0.1.0 (4055652, 4055188)" on a Win 7 machine. The file listed below uses ...
113 views

### Generate a list of values with equal number of each value

I want to create a list of 32 values such that from {a,b} I can generate ...
100 views

### Can ParallelDo speed up a counting problem?

How to make parallelize the following code keeping the same "idea". The example I have in mind is more complicated, but I would like to know if a program of this structure can be parallelized? ...
97 views

### looping in mathematica for using the current value as initial state of next value [closed]

i have some initial state $psi[x,t]$. I perform some operation on it and store the value in another state $pi1[x,t]$. Now on the next step i have to use $psi1[x,t]$ as initial state and perform the ...
99 views

### HighlightGraph and Hyperlink

In the documentation of Mathematica it is mentioned that you can use Hyperlink and Tooltip as wrapper in a similar manner as ...
303 views

### region plot in a 2-simplex

I want to plot a 2-dimensional region with constraint $x+y\le N$, i.e., I want to plot a sub-region inside a 2-simplex. As an example: ...
89 views

### What string pattern will match $n$ contiguous characters drawn from a given alphabet?

I'd like to use StringCount to count the number of subwords in a string that have the form **** where ...
21 views

### How do I plus these values in a list [duplicate]

Hi I need to plus 3 values together each time for the rest of the list. How do I basically add the 3 sets of values together each time. When I try Plus[] it returns the same input values back to me ...
257 views

### How to get more accurate orthonormal eigenvectors?

I have a matrix M with real entries in MachinePrecision. I compute its eigenvectors and construct matrix ...
76 views

### Pattern matching with PDF, Distributed and multivariate distributions

I have defined a function to compute the Shannon entropy of a probability distribution: ent[p_] := Expectation[-Log[PDF[p, x]], x \[Distributed] p] This works ...
96 views

### How do I use Subgraph to sample the $n$ vertices of a graph with the greatest connectivity?

Let $G$ be an arbitrary graph with some number of vertices $||V||$ and some number of edges $||E||$. We can use Subgraph to generate, well, a subgraph of ...
501 views

### Why the complicated pattern in this 3D plot?

ListPointPlot3D[ Table[{n, s, (Prime[n]^s/(Prime[n]^s - 1))}, {n, 1, 2000}, {s, 2, 80}], PlotRange -> All] Is the pattern the result of the data, the ...
109 views

### Define a function that takes ragged array [closed]

newbie here. I want to define a function that takes a ragged array and return another one, but how. Say, I want to define a simple function behaves like this ...
60 views

### How to compute variances from a matrix/table

I have created a matrix/table with an imported dataset. I want to know what the variance is for 3 values at a time but across 68 columns. I would like to do this in an automated way rather than 1 set ...
178 views

### Aligning controls and their labels to grid?

I have a Manipulate with 6 sliders controlling 6 different variables. I have labelled them all. The problem is that the labels have different lengths, so it looks a ...
149 views

### Explain the difference between ViewPoint and ViewVector?

I've read the documentation, but am still very unclear as to what the difference is between ViewVector and ViewPoint for ...
78 views

### Linear interpolation over 2 variables

I'm tuning a function to data over 4-5 variables using Differential Evolution. The objective function calls frequently interpolation function. I came to a point, where compiling the objective function ...
613 views

### Undocumented form for Extract

Prompted by a comments conversation here, here's an interesting (and often performance enhancing) use of Extract: ...
98 views

### Removing a ProgessIndicator when no longer needed

I have a progress indicator in my Mathematica notebook that I update as various calculations are performed: indicator = ProgressIndicator[Dynamic[progress]]; I ...
263 views

### A problem with functions and Infinite expression 1/0 encountering

Following code (function) makes integrals and then replace f[x] with Cos functions and calculate the definite parametric ...
122 views

### A problem with set values

The following code is just an example to clearly explain my problem. Assume that : ...
119 views

### How to get mathematica to simplify a result

I have the following output $\text{Li}_2\left(3-2 \sqrt{2}\right)-4 \text{Li}_2\left(-1+\sqrt{2}\right)$. This turns out to be equivalent to $\displaystyle\log^2(1+\sqrt{2})-\frac{\pi^2}{4}$. How ...
218 views

### Another one problem with legends on GraphicsGrid

I have used ListLinePlot to generate this grid of plots: and I want to add a legend in Row Layout below this grid. My code, has as follows: ...
107 views

### An example of how to compute numerically the KL-divergence in mathematica [closed]

I wanted to compute an exact number for two probabilities that I am comparing. These are two normal distributions as: $$Normal(\mu = 5, \sigma = 4)$$ $$Normal(\mu = 5, \sigma = 5)$$ I decided to ...
Consider the integration, $\int _0 ^\infty dx\ x \tanh( \pi x) \sqrt {x^2 + a^2 }$ where $a$ is a real number. This integral is divergent. We note that an asymptotic expansion of the integrand ...