# All Questions

33 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 ...
312 views

### Undocumented form for Extract

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

### Transform recursion for coefficients into differential equation for generating function

Assume, one is given a linear recursion with polynomial coefficients for a sequence $(a_i)_i$, such as a[i] == i a[i-1] I would like to convert this recursion ...
85 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 ...
36 views

### Simple propability issue [on hold]

I have a simple problem: I have 16 kitties. There is 1/2 chance to get a male and 1/2 chance to get a female. What is the probability to get at least a female? Then, if 10 kitties die, what is the ...
32 views

### ImageCapture on Windows 8.1

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 ...
105 views

### Solving simultaneous exponential equations

In[1]: Solve[{(1 + k)^n == 0.6, (1 + k)^(n + 1) == 0.3}, {n, k}] Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; ...
73 views

### Calculating the Lyapunov Exponent/Spectrum for the Duffing Oscillator

Some fellow students and I are trying to calculate and plot the Lyapunov spectrum for the Duffing oscillator (currently a test approach). Each of us has Mathematica knowledge based purely on past ...
126 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: ...
97 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. ...
53 views

### Document Creation: inserting a grid

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

### Automatic method for NDSolve [duplicate]

How can I understand which method Mathematica automatically chooses to use for numerically solving the following two equations? 1: ...
108 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: ...
25 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 ...
45k views

### Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
189 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 ...
55 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 ...
22 views

### Export Messing Up Alignment of Bar Chart

Here is my code: ...
40 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: ...
194 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 ...
41 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 ...
70 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 ...
62 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? ...
68 views

### Using KalmanFilter or KalmanEstimator

I have the following: ...
31 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. ...
96 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 ...
74 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 ...
36 views

I am trying to solve this recurrence relation: RSolve[a[n]==k*a[n-1]+t[n], a[n], n] Mathematica returns: $\left\{\left\{a(n)\to j^{n-1} \left(\sum ... 1answer 493 views ### How to map rotate, pan, zoom to manipulate controls I am wondering if there is a way to restrict the motion of the rotate mouse cursor in when moving around a 3d plot. For example, I want the y direction of the cursor to correspond to pulling the z ... 1answer 62 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 ... 1answer 69 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 ... 1answer 179 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 ... 0answers 50 views ### How to generate all symmetric positive semidefinite 0,1 matrices of a given order [on hold] The title says it all. There are many instances when we need to check some properties of such matrices. I am looking for an efficient code. 5answers 1k views ### Identifying critical points of 2/3D image/cubes Upshot I am interested in identifying critical points of a 3D field/cubes (maxima, minima, tube-like and wall-like saddle points) and 2D field/image (maxima, minima, saddle points). I.e. the ... 1answer 46 views ### looping in mathemtaica for using the current value as initial state of next value [on hold] 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 ... 0answers 11 views ### Showiing that matix is an eigenvector? [migrated] Let A= a b c d be a 2 x 2 matrix, where a,b,c and d are real numbers. We say that A admits an eigenvector if there exists a unit vector u and a real ... 0answers 68 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 ... 0answers 66 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: ... 1answer 66 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 ... 1answer 40 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 ... 0answers 21 views ### Optimizing FindInstance for large systems of Diophantine equations [on hold] 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 ... 1answer 76 views ### Plot Notes present in sound sample I would like to visualize a sampled sound, and place the sounds as notes starting from C0 to A8 or such. I have a table of ... 2answers 159 views ### Scan vs Map vs Apply I cannot understand the difference between Apply, Scan, and Map. I have tried to play with ... 4answers 723 views ### Converting a large floating-point number to a single-line string When I feed a large (or small) enough floating-point number to ToString, it produces a two-line string, with the first line containing only the exponent of 10: ... 1answer 131 views ### How to change the appearance of a group opener? I would like to change the GroupOpener appearance. In the present Mma design it is too small and can be missed by a reader unfamiliar with Mma. I know, how to change its color through the ... 1answer 54 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 ... 1answer 80 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 ... 1answer 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 ...