2
votes
2answers
64 views

Constrain movement of Locator (increased t-value)

Continuing with the code at the end this topic, I am now searching for a way of constraining the movement of the locator so that it doesn't "jump" from one "part" of the graph of f to another. So, if ...
10
votes
2answers
164 views

Can I define new graphics directives?

Is it possible to define new graphics directives? For example, suppose I want to be able to use the following code: ...
2
votes
3answers
260 views

Minimization problem

How could you find the smallest constant $c$ that satisfies $$\frac{3^{3k}e\sqrt{3}}{\pi\sqrt{k}\;2^{3/2+2k}} \leq 2^{\;c\;k}$$ assuming $k\geq 1$ is an integer. You can of course take logs of ...
4
votes
1answer
226 views

Creating a function to simplify WolframAlpha query

When I can't remember an integral I usually just query wolfram and have it show steps. This was my naive attempt at trying to make a simpler function. ...
6
votes
2answers
182 views

Get information about a stack of images, without plotting it

A very long time ago I used Mathematica for a few months and found it very intuitive. Now for my work I use MatLab. I was just trying some stuff out with Mathematica again and there is something I ...
-1
votes
2answers
99 views

Palette for pasting matrix templates into a notebook

How I can build a palette of matrices?. So, I would like a palette with a 3x3 square matrix, a square matrix 4x4, 1x3 row matrix, 1x4 matrix row, column matrix 3x1 and 4x1 column matrix.
2
votes
1answer
112 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: ...
2
votes
1answer
83 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 ...
6
votes
3answers
272 views
4
votes
2answers
141 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 ...
2
votes
2answers
103 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 ...
0
votes
0answers
51 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 ...
0
votes
1answer
132 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: ...
11
votes
1answer
105 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? ...
17
votes
3answers
834 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 ...
0
votes
1answer
145 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 ...
12
votes
5answers
533 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 ...
0
votes
0answers
117 views

How to simplify really complicated symbolic expression?

I have an expression that contains Sinh[x], Cosh[x] and Sin[g], and I want to simplify it ...
5
votes
0answers
149 views

Does OpenCL/Cuda memory leak if not Unloaded? Problem with allocating/loading GPU memory in Module

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 ...
0
votes
3answers
133 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 -> ...
3
votes
0answers
93 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 ...
1
vote
2answers
346 views

How to debug error triggered by replacement rule?

The second line below produces the errors shown: ...
0
votes
1answer
151 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: ...
5
votes
1answer
539 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 ...
7
votes
3answers
121 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 ...
21
votes
5answers
1k 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 ...
2
votes
1answer
339 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: ...
0
votes
0answers
110 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 ...
0
votes
1answer
186 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: ...
14
votes
4answers
492 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 ...
9
votes
1answer
110 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 ...
23
votes
5answers
580 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 ...
7
votes
2answers
639 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 ...
3
votes
1answer
201 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 ...
9
votes
1answer
194 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 ...
0
votes
1answer
142 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 ...
4
votes
1answer
115 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 ...
2
votes
1answer
489 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 ...
4
votes
1answer
103 views

How to explain the result of the two functins?

How to explain the result of the two functins? Input1: ...
5
votes
1answer
356 views

How to make a filled Ellipsoid?

I want to make a filled Ellipsoid, but it seems Filling options doesn't work in Graphics ...
8
votes
5answers
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 ...
1
vote
0answers
108 views
2
votes
1answer
656 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 ...
5
votes
1answer
257 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 ...
9
votes
3answers
2k views

How to plot periodic function's graphic?

How to plot periodic function's graphic? For example, f(t) = t when -5<t<5 && f(t+10) = f(t) ...
1
vote
2answers
268 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 ...
1
vote
1answer
82 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};` ...
15
votes
2answers
506 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 ...
2
votes
1answer
422 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}] ...
0
votes
1answer
57 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" ...

15 30 50 per page