4
votes
2answers
90 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 ...
1
vote
2answers
135 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: ...
7
votes
1answer
425 views

Using KalmanFilter or KalmanEstimator

I have the following: ...
0
votes
1answer
58 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. ...
0
votes
2answers
125 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 ...
1
vote
1answer
195 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 ...
11
votes
1answer
272 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 ...
0
votes
4answers
156 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: ...
3
votes
1answer
169 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 ...
0
votes
0answers
107 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: ...
0
votes
0answers
143 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 ...
2
votes
1answer
136 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 ...
0
votes
1answer
105 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? ...
0
votes
1answer
107 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 ...
6
votes
0answers
103 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 ...
2
votes
2answers
338 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: ...
4
votes
1answer
93 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 ...
0
votes
0answers
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 ...
0
votes
1answer
306 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 ...
0
votes
1answer
82 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 ...
1
vote
1answer
104 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 ...
3
votes
1answer
504 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 ...
0
votes
0answers
62 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 ...
2
votes
1answer
245 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 ...
8
votes
1answer
172 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 ...
0
votes
0answers
111 views

Linear interpolation over 2 variables [duplicate]

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 ...
25
votes
1answer
622 views

Undocumented form for Extract

Prompted by a comments conversation here, here's an interesting (and often performance enhancing) use of Extract: ...
0
votes
3answers
101 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 ...
0
votes
0answers
315 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 ...
0
votes
1answer
127 views

A problem with set values

The following code is just an example to clearly explain my problem. Assume that : ...
4
votes
0answers
129 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 ...
2
votes
1answer
298 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: ...
4
votes
1answer
181 views

What are these strange shapes in my Plot3D[]? [closed]

Plotting a function, I noticed some strange spots away from the main feature, the dark purple here: You can see that they don't actually have any curvature themselves: Strangely, you don't see ...
1
vote
2answers
159 views

Making mathematica do regulated integrals

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 ...
0
votes
0answers
223 views

Making single letters non-italic in Graphics/Text/Style objects

Suppose that I use Graphics, Text, and Style to type one letter in the subscript of a letter ...
20
votes
2answers
1k views

Scan vs. Map vs. Apply

I cannot understand the difference between Apply, Scan, and Map. I have tried to play with ...
0
votes
1answer
34 views

How would I enable the Evaluate in place item of the Evaluate menu?

I would like to be able to suppress multiple outputs when a cell is evaluated. Is there a way to enable the "Evaluate in place" menu item of the Evaluate menu?
0
votes
1answer
110 views

Create new file, based on 500 articles

I've got a folder with 500 newspaper articles. Each article is saved in a seperate file with a number in the title like "1.txt", "2.txt". Each article has a date but it is not clear in which line the ...
6
votes
3answers
296 views

Map structure of irregular list, Flatten then reconstruct list using structure

I'm trying to use Compile[] to improve the performance of an algorithm. The algorithm works on a set of matrices which are not of a similar shape. Unfortunately ...
2
votes
3answers
227 views

Recover data points from RGBColor of known ColorScheme

In general I want to recover the z-values from an image of a DensityPlot. A simple example might just be ...
2
votes
0answers
49 views

$Failed below input area of new cell in notebook

The Mathematica 9 installation on my laptop has developed an odd feature. Just underneath the grey line indicating the input area for a new cell, the expression ...
0
votes
1answer
79 views

Sorting a table of vectors with weights [duplicate]

I'm trying to simplify a table, for instance {{1, {4, 2, 0}}, {4, {2, 4, 0}}, {-2, {3, 3, 0}}, {1, {3, 0, 3}}, {-3, {0, 4, 2}}} Here the first column is the ...
3
votes
2answers
160 views

Mathematica not recognising closed forms as specific values

I have a Mathematica program that outputs a piecewise function, and some parts of the expression are not being recognised as specific numbers when using ...
1
vote
1answer
344 views

Why my differential equations become True? [duplicate]

I've been trying to solve a system of nonlinear differential equation, but the conditions are a bit weird. Two of the differentials equate to the same equation, but have different boundary ...
1
vote
1answer
266 views

Get Cos[2 x] in “Solve”

My goal is to get an analytical solution of x ( $\lambda$ in the problem), when $\epsilon$ (f[x] in the problem) is maximum (use inverse form). I found that if I can use trigonometric identity ...
0
votes
0answers
65 views

Derive a PDE from other PDEs

I'm trying to do some symbolic calculation like this: Substitute (11.2) into the last two of equations (11.1) and, in turn, substitute these into the first of equations(11.1), I want to ...
4
votes
1answer
144 views

Shift text upwards in graphics so characters with descenders clear horizontal lines

Is there an option to align Text to automatically adjust for font descent? In the attached graphic, strings that contain "g" are visibly shifted upward, even though all strings are uniformly ...
2
votes
0answers
125 views

Displaying primes as a 3D array of spheres

I am currently learning my way through Mathematica and have stumbled upon a strange problem. It is asking me to implement PrimeQ into ...
0
votes
0answers
55 views

problem solving a simple integral equation

I'm looking for a function q(x) so that integral( q(t) , t , x, x+2*pi/3) == a*sin(x)+b Could anyone help me on this one? Thx in advance
1
vote
0answers
133 views

How can I make my MM code more compact and readable? Can I put functions in different notebooks?

I'm doing some coding in MM9, but my program is getting quite large. It's mostly a bunch of functions defined at the beginning of it, but it's getting to the point where I have to scroll for a few ...

15 30 50 per page