# All Questions

70 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: ...
72 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 ...
78 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 ...
64 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? ...
21 views

### Optimizing FindInstance for large systems of Diophantine equations [closed]

I have a system of Diophantine equations, with about 15 equations and 25 unknowns. To find at least one solution to this system I can use FindInstance and specify the domain to be Integers. But in ...
60 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 ...
71 views

In the documentation of Mathematica it is mentioned that you can use Hyperlink and Tooltip as wrapper in a similar manner as ...
132 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: ...
68 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 ...
76 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 ...
42 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 ...
59 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 ...
466 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 ...
49 views

### Solving Laplace-Beltrami Equation on a Curved Surface [closed]

Suppose that we have a curved surface $S$, specifically, $S$ is a bump, i.e., $x=\rho\cos(\theta)$, $y=\rho\sin(\theta)$, $z=h\cos^2(\frac{\pi\rho}{2R})$, where $\rho$ runs from $-R$ to $R$ and ...
70 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 ...
51 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 ...
32 views

### Splitting a list into list of lists [closed]

I am trying to split a flattened list of data into a list containing 4-vectors. Consider the sample set of data (number of elements always a multiple of 4) ...
55 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 ...
77 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 ...
36 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 ...
359 views

### Undocumented form for Extract

Prompted by a comments conversation here, here's an interesting (and often performance enhancing) use of Extract: ...
76 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 ...
37 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 ...
75 views

### A problem with set values

The following code is just an example to clearly explain my problem. Assume that : ...
73 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 ...
40 views

### draw graphics in cycle [closed]

Good evening. I've made the following plot g1 := Plot[f[x], {x, -3, 5}] gr1[f_, xmin_, xmax_, slices_] := Module[{span = (xmax - xmin)/slices, ext}, ext[op_, r_] := First@Quiet@op[{f[x], r ...
65 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: ...
31 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 ...
132 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 ...
47 views

### Solving nonlinear system by newton method [closed]

How to solve nonlinear system by newton method (without Findroot method)? What is algorithm?
127 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 ...
27 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 ...
211 views

### Scan vs Map vs Apply

I cannot understand the difference between Apply, Scan, and Map. I have tried to play with ...
23 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?
42 views

### solving simple integral equation [closed]

Could someone help me finding q(t) so that $$\int_x^{x+2\pi/3}q(t)\,\mathrm{d}t = a\cdot\sin{(x)}+b$$ Thanks in advance!
13 views

### how to find find a matrix by the characteristic vlaues and vectors [migrated]

Now I am studying linear algebra course, In that for a given matrix we are finding the characteristic values (eigen values) and characteristic vectors (eigen vectors). But my question is why cant we ...
84 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 ...
18 views

### Is it possible to suppress additive outputs when cells are evaluated? [closed]

Is it possible to suppress multiple outputs when a notebook is evaluated? Ideally, I would like to have a notebook with single instances of output. Currently when I open a notebook, I have to ...
205 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 ...
113 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 ...
37 views

49 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 ...