# All Questions

132 views

### Interaction between two sliders that update the same variable

I'm basing this on the code found in the Introduction to Dynamics. I added one more slider which doesn't use the "round and snap" feature given in the link above: ...
95 views

### Constrain movement of Locator

Continuing the discussion started in the thread here, I've tried to recreate the code from scratch. I thus looked to constrain the movement of a locator to the graph defined by ...
345 views

### Very different results from evaluating same expression with different precisions

When I evalute the following expression, ...
172 views

### Speeding up Position for finding the indices of a small number of integer elements in a large matrix

I have a large $100 \times 4000$ element matrix composed of integer elements, testMatrix, and I was to use Position to find the ...
125 views

### Extracting variables from Hold expression

For example I have some global assignments x=1;y=2;z=3 and an expression Hold[x*y/z]. How can I now extract variables ...
54 views

### Construct matrix B from columns of matrix A? [duplicate]

Starting with Mathematica and working with matrices, I am looking for a way to construct a new matrix B from columns of matrix A. For example, matrix a has 8 columns and 4 rows, I want matrix B to be ...
153 views

### Generating an array using list values at indices corresponding to entries in a separate list satisfying some criterion

Imagine one has an array of integer value sets that looks like this: ...
135 views

### Slideshow mode: how to cycle slides automatically?

I'm doing a slideshow for an informative conference, so I need a slideshow running in background on some monitors. My question is: is there any way to make Mathematica to cycle slides automatically? ...
1k views

### Generate a Random Polygon

Does some package exist with a function that takes a parameter $n$ and generates a random 2D $n$-sided simple polygon (convex or non-convex), possibly within a certain bounding box? It does not ...
169 views

### johansen test error in code

Cross-posted at the Wolfram community forum I have found this code on a forum, apparently it worked in a previous version of mathematica. Now when I run it, it keeps running for ages. I am not able ...
628 views

### How to remove duplicate characters from a string?

How do you remove duplicate characters in a string without converting the string to a list. I want to delete all duplicate characters in a string (i.e. get the unsorted union of characters). For ...
201 views

The GPU memory manager documentation is not too clear, does GPU memory leak if not explicitly unloaded or if the symbol that holds the reference to the GPU memory gets collected, the GPU memory gets ...
194 views

### How to create a discrete 2d slider using existing 2d data?

data = Sort[RandomReal[{0, 1}, {100, 2}]]; Manipulate[pt, {pt, data}, ControlType -> Slider2D] I get a error message: Manipulate::vstype: ControlType -> ...
111 views

### Gather dependency on list order?

I get intrigued about Gather behavior on this post. I thought that Gather was invariant under list order? Here is the result I ...
471 views

### How to debug error triggered by replacement rule?

The second line below produces the errors shown: ...
209 views

### Checking differential equation solution

I have this differential equation: eq=D[ψ[r],r]+A*ψ[r]-(B/(A*r))ψ[r]==0; And DSolve sucessfully solves it: ...
758 views

### Clustering 3D Data Points on a Periodic Cubic Grid

I have a set of 3D data points on a cubic grid. The data can be downloaded from here https://skydrive.live.com/redir?resid=F96524B72DCD75FB!14240 and read into a variable ...
135 views

### How to stop a single function to be evaluated?

See this example: AA = {x} \[Function] Normalize[x] BB = {x} \[Function] Evaluate[AA[x]*5] I need BB to be Normalize[x]*5. Some context:I call evaluate because ...
2k views

### How to plot the contour of f[x,y]==0 if always f[x,y]>=0

I've been stuck at this problem for weeks and I've asked several related questions here: ContourPlot shows only part of the contours [duplicate] How to plot the contour of the radius part of a ...
462 views

### Avoiding zero (empty set) solution with NDSolve

I'm trying to use NDSolve for a chemical kinetics equation where the rate of conversion is given by this relationship as typed in Mathematica: ...
185 views

### step by step interactive indefinite integral

WolframAlpha can give step by step solution for indefinite integral. There seems to be similar question but for derivatives. Is there a way that I can generate my own step by step solution for ...
297 views

### Find if element exists in N-dimensional array

I was wondering if there was a more elegant way of finding whether an element exists in an N-dimensional array. The way I would do it is: ...
564 views

### Can TreeForm be displayed “sideways”?

One recurrent problem I'm having with displays generated with TreeForm is that the expressions to be so displayed often at least one level with many (> 20) nodes ...
123 views

### Why can't I remove the {0, 0} in Circle[{0, 0}] using pattern matching?

Why does Circle[{0, 0}] /. List[_?NumericQ ..] :> Sequence[] return Circle[{0, 0}] yet ...
763 views

### How to examine the structure of Graphics objects

One difficulty I'm encountering in studying the structure of Graphics objects is that I have not yet found a way to print or display such structures that are ...
1k views

### Function to subdivide interval into n evenly-spaced points

[This post needs better tags than I could come up with. Edits to the tags would be particularly welcome.] I realize that it is trivial to define a function that takes an interval (i.e. two ...
250 views

### How to plot the contour of the radius part of a complex function

Suppose we have a complex function $f(x,y)$, in which x and y are real variables. In theory we can write the function into the polar form $$f(x,y)=r(x,y)e^{i\theta(xy)}$$ where $r(x,y)$ and ...
221 views

### Structure of Graphics (esp. those produced by Plot, ListPlot, etc.)

I'm looking for a description of the structure of Graphics objects, aimed at the advanced Mathematica programmer. The motivation for this question is the ...
250 views

### String to File removing quotation marks

If I print a string to a file it also adds quotation marks to the string. Here is an example: a = "test \t test" a >> file FilePrint["file"] How can I ...
187 views

### How to expand multiple cells at once?

Is there a simple way to expand multiple cells simultaneously? At the moment I am primarily interested in fully expanding "in one fell swoop" all the cells in a documentation window, although I can ...
626 views

### How to plot the Euler's formula in 3D?

In Von Neumann's stability analysis of Finite Difference Equations, the Euler's formula is used to describe a perturbation. Now the finite difference equation is stable if this perturbation does not ...
109 views

### How to explain the result of the two functins?

How to explain the result of the two functins? Input1: ...
436 views

### How to make a filled Ellipsoid?

I want to make a filled Ellipsoid, but it seems Filling options doesn't work in Graphics ...
2k views

### Sum all numbers from 1 to 1000 divided by either 2,3,5 or 7

How do I find the sum all numbers from 1 to 1000 divided by atleast one of 2,3,5 or 7? EDIT: I am sorry for complicating this, but I need it to work for 10^11. So anything that requires too much heap ...
128 views

...
979 views

### Obtain a stable solution using NDSolve

I am trying to solve a partial differential equation using NDSolve. When I am not specifying any method options with NDSolve, it ...
349 views

### Setting a Counter in Mathematica Notebook

I would like to write a book using Mathematica, but I will write one chapter on several files. How to tell Mathematica that the BookChapterNumber pointer has the ...
3k views

### How to plot periodic function's graphic?

How to plot periodic function's graphic? For example, $f(t) = t$ when $-5<t<5$ and $f(t+10) = f(t)$. ...
361 views

### How to interpret an image histogram and plot histogram3D for an image?

I'm really finding many ambiguities in how I really should interpret the histogram of an RGB image? I could understand what the height denotes, but did not understand how the pixels get plotted on a ...
87 views

### Insert glyphs into a string using functional code

I asked this question few days ago: Replace For-loop with functional code Suppose I use strings instead of lists; for example a = ToString /@ {123123, 112233};` ...
691 views

### How to write plain Greek in a text cell

If I create a text cell and type some greek text, most of the symbols are italics as if the cell had an Input style. It doesn't happen with latin characters. I recollect that it is impossible to fix ...
624 views

### ContourPlot shows only part of the contours [duplicate]

Consider these contour plots: f[x_,y_]:=Cos[x] + Cos[y] ContourPlot[f[x, y] == 0, {x, 0, 4 Pi}, {y, 0, 4 Pi}] ...
65 views

### can someone how to plot $x = c$ in a different color scheme? [duplicate]

Exactly as title says. I do not know why I am having so much trouble with this. I have googled many solutions and I cannot find a straightforward answer. Also, the only method I know is "Gridlines" ...
729 views

### What's the cleanest functional-programming style way to perform this list operation?

I am looking for the correct method for accomplishing the unknown piece in the following code snippet: rolls = Tuples[Range[1, 4], {2}] ...
379 views

### Long text inside a grid does not word wrap

If I create a simple grid with Ctrl+, and paste a long piece of text outside the boxes (I'm sure you can find some yourself), then that text does not break at the width of the window in Mathematica. ...
738 views

### Solving a diffusion equation

I need to solve a particular diffusion equation with NO boundaries (see eqn. (2.10) in: Ann. Rev. Astron. Astrophys. 19:137-62 (1981).) with nu = cost. ...
219 views

### Plotting data with 4 columns!

I'd like 3Dplot a list of data with 4 columns (these are mesh outputs): x1 y1 z1 Dose1 x2 y2 z2 Dose2 . . . which command i ...
69 views

### Combine 2D images perpendicular to each other [duplicate]

I would like to create a slice plot from multiple density plots in Mathematica. A solution for this probem has been posted in this forum before (Is there something like DensityPlot3D?). But how would ...