2
votes
1answer
146 views

How can I place gui controls inside Grid? [duplicate]

In all my apps, I am facing a problem about placing the Gui controls inside Grid. For this purpose, I wrote three functions. The first function, ...
4
votes
1answer
609 views

Legend for ListContourPlot

Consider this example below for ListContourPlot. ListContourPlot[ Table[Sin[j^2 + i], {i, 0, Pi, 0.02}, {j, 0, Pi, 0.02}], PlotLegends -> Automatic] I ...
40
votes
5answers
4k views

How can this image (optical illusion) be created with Mathematica?

I came across this image the other day: and liked the sensation of it pulsing. I was wondering if anyone would know how to create something similar with Mathematica (without the Pink Floyd Dark ...
1
vote
1answer
513 views

How to run Mathematica using Mac Terminal

My question is so trivial and I'm sure most people in here know exactly how to do this, however I still don't know how to run Mathematica in Mac terminal! I need to use all the cores of my computer ...
3
votes
1answer
582 views

NDSolve for a large system of simple ODEs

I am solving a system of many (more than 100) ODEs. It is the kind of standard rate equation encountered in semiconductor physics. Here is the system: ...
5
votes
1answer
122 views

Is there a way to prevent audio from becoming out of sync with graphics?

The code below could be used to say help Pre-Kindergarten and Kindergarten children learn about the numerals and numbers from one to 9. The problem is that this age group would be prone to just ...
3
votes
3answers
308 views

How to extract phase angle from sinusoid

I'm doing some electric circuit calcualtions and I'm trying to get the phasor representation of some arbitrary function of Sin or Cos. Could be complex like: ...
1
vote
1answer
61 views

Control formatting of a Text element in a plot?

Is it possible to define the format for a part of Text in a plot? For instance, is it possible to have v bold and ...
7
votes
4answers
508 views

How can I shorten this code to rotate a line segment around its center?

I have a list of line segments stored in the form: { {{x11,y11},{x12,y12}} , {{x21,y21},{x22,y22}} , ... , {{xn1,yn1},{xn2,yn2}} } Now I want to rotate all of ...
7
votes
0answers
437 views

Creating and using an explicit piecewise function in a convenient way

I have a set of data points that define a function in the form curvePts = {data1,data2,...} where ...
13
votes
1answer
361 views

Why does Mathematica give an incorrect answer to this multiple integral?

This is not a new problem but I would like to understand why Mathematica gives the result that it does. (Volume of a hypersphere) ...
3
votes
2answers
272 views

how to Export raster data as a tiff unmolested

I feel certain there is a simple answere here.. how do I export image data to a tiff without any scaling? I want to read back in the exact data. ...
3
votes
1answer
122 views

Use NotebookWrite with Graphics?

I am trying to use NotebookWrite to paste a plot into another notebook. The code looks something like: ...
0
votes
1answer
127 views

How to obtain an approximate function for SmoothHistogram3D?

I have a random distribution of points in the $x\!-\!y$ plane. I can obtain a graphical representation of the probability distribution function using ...
4
votes
1answer
380 views

Error trying to open a notebook in Wolfram Workbench [duplicate]

I recently set up Mathematica 9.0.1 on a new computer, along with x64 Eclipse Indigo with JRE 1.7, and the Wolfram Workbench 2 plug-in. Something is amiss, because when I try to do any sort of task ...
2
votes
1answer
239 views

A basic problem with Solve

I have this equation: 4b*Cos[2t]-4a*Sin[2t]==4Cos[2t]+8Sin[2t] Which I would like to solve. Without using mathematica, you can pretty easily see that a = -2 and ...
3
votes
1answer
210 views

Differentiating ParametricNDSolve solutions

Is there any way to differentiate a solution obtained by ParametricNDSolve? For instance, I have the position $\phi_\gamma(t)$ as a function of time, parametrized ...
6
votes
1answer
825 views

Smoothing/Averaging 2D Vector Fields

I have a list of 2D vectors defined by {{x,y},{u,v}} and would like to smooth or average the vectors. For example here are 2 vector fields, the second has noise ...
8
votes
3answers
238 views

Declaration of abstract matrices to perform series expansion on them

I would like to have abstract matrices M and S to get out the coefficients of matrix power series however it treats M and S as numbers even if i checked that M.S - S.M != 0. I attach my code below: ...
3
votes
1answer
132 views

FrameTicks given through Show does not work with LogLogPlot

This is similar to the closed topic: Frame ticks for a Log Log plot [closed]. Let me reuse (rm -rf)'s example here. FrameTicks given through Show does not appear if used with LogLogPlot: ...
3
votes
2answers
246 views

Mathematica does not understand (R^3)^(1/3) is the same as R [closed]

In the output from a calculation in mathematica stands a/((R^3*c)^(1/3)), with c and a ...
0
votes
2answers
807 views

Why function cannot be defined inside For loop? [closed]

I have a following code (which is simplified version of what I am doing): For[i = 1, i <= 5, i++, f[x_] := Sin[x]^2 Print[{i, f[i]}] ] And the question ...
0
votes
1answer
204 views

CDF won't work but NB works

I converted a .nb with the following content to a standalone CDF but I get an error that says: "An unknown box name (N) was sent as the BoxForm for the expression. Check the format rules for the ...
0
votes
2answers
119 views

How to get rid of trailing string after using Convert?

Convert[0.05263, Percent] /. Percent -> "%" I would like to remove the trailing "%" but if I put Percent->"" it concatenates a literal empty pair of quotes. ...
5
votes
2answers
181 views

How to count words in a Greek text

I want to perform a simple analysis of some Greek text: collect the different words used and count their frequency. It seems that some of the built-in commands do not work well with Greek letters. For ...
0
votes
2answers
458 views

NDSolve solution for driven damped pendulum diverges

I want to solve numerically for the system of the driven damped pendulum using Mathematica. This is the second-order nonlinear equation \begin{equation} \ddot{x} + 2 \beta \dot{x}+ \omega_0^2 \sin ...
0
votes
0answers
49 views

manipulate: time limit on calculations [duplicate]

I'd like to disable the 5 second time limit in the manipulate construct. I read about setting SynchronousUpdating -> False But for some reason this does ...
9
votes
4answers
821 views

Drawing minor gridlines

What's the best (most elegant, shortest, easiest to read) way to add minor grid lines to a plot? Here is an example: ...
3
votes
2answers
136 views

Generating a list of pure variables

I want to pass a list of pure variables to a function, in which the ordering of the variables matters. For instance, if I want a palindrome, my function might be: ...
1
vote
1answer
142 views

Splitting list of sums into a sum of lists

I want to split a list of sums into a sum of lists For example, I'd like to turn {{x + y + z}, {x}, {y}, {z}} into ...
5
votes
4answers
191 views

FrameLabel not printing completely

Running this code: ...
3
votes
1answer
191 views

Distance between two functions satisfying a constraint

My problem is that I have two functions that are described as follows: ...
2
votes
1answer
129 views

Standard Deviation and StandardDeviationFilter

I found this scant description of StandardDeviationFilter in the documentation, implying one could use it to generate a moving standard deviation: I've got a ...
10
votes
2answers
379 views

How can I access the internal function that plots a molecule from a formatted XYZ file?

Mathematica has the ability to plot a molecule using the data contained in an XYZ file. This is a simple text file, of which this is an example. The molecule is plotted using the Import command. ...
2
votes
2answers
133 views

Arrow pointing upwards in a Graphics3D

I am trying to write a code for an arrow that points upwards from the center of the circle in a Graphics3D. ...
1
vote
0answers
73 views

Sharing styles between notebooks (Mathematica v9) [duplicate]

It appears from the documentation that we share styles via stylesheets. I am trying to set up a customised default stylesheet for my notebooks. I have tried simple ideas, and more complex ones, ...
0
votes
1answer
121 views

Hue function for negative arguments

I want to use Hue function for different colours with the argument being a function, i.e., Hue[f[i,j]] Now, ...
5
votes
1answer
105 views

“And” to continue evaluation after “False”

Below, is it possible to print No and have x be 2. That is, I'm looking for an And-like function that looks at all arguments ...
4
votes
4answers
150 views

Put local variables for Block in a variable [duplicate]

Is is possible to assign {x = 2, y = 3, z = 4} to a variable var so that one can write ...
2
votes
1answer
89 views

The proper way to write the input for a certain series

Mathematica tells the series below doesn't converge. I think it converges. What would the proper way to write things be as an input? ...
7
votes
2answers
955 views

How do I save my animation/manipulation in pdf?

Is it possible to presserve my animation and manipulation plots in the pdf?
5
votes
1answer
250 views

Is there an equivalent of “shiftdim” of MATLAB?

Recently I'm spending my time implementing some computer vision algorithms, which usually handle a large amount of data. The problem I'm facing now is that I have to reform my video data to pass it ...
2
votes
1answer
164 views

Strange spikes in my surface

I'm getting strange spikes in my surface S with the code below. PlotPoints seems to help, but it doesn't solve the problem. Any ...
15
votes
2answers
269 views

Upon PDF export, edgeless rectangles do not tile perfectly, and corners may be cut. Is this a bug?

Note: this problem is no longer present in version 10. Exporting the following as a PDF file ...
2
votes
2answers
622 views

distance between two curves

I try to compute the distance between two curves. I use the EuclideanDistance to do that. Here my code: ...
0
votes
1answer
253 views

Plot a function over a specific domain

I have a function that is defined on a specific domain for example the function $$f(x,y)=(x-0.5)*(y-0.5)$$ defined on $\Sigma$ which is the circle $(x-0.5)^2+(y-0.5)^2=0.5^2$ How to plot $f$ over ...
0
votes
0answers
140 views

Any way to fully expand an expression of two operators?

I am looking for a way to expand a complicate expression like the follow (A o B + C o (DxE))*(D o (ExF) - ExA + A) Here o and x are the operator. I want to ...
2
votes
1answer
265 views

Coloring with Hue for a function on a lattice grid

I wish to color a 2-dimensional lattice grid according to the value of a function at each lattice-node. More specifically, if I have 9 angles in a 3x3 array, ...
3
votes
3answers
211 views

Matrix multiplication that includes a tensor

How would I best express the following in Mathematica: $\begin{pmatrix}2 & 4\end{pmatrix} \begin{pmatrix}r_1 & r_2\\r_3 & r_4\end{pmatrix} \begin{pmatrix}6 \\ 8\end{pmatrix}$, where $r_i$ ...
4
votes
1answer
297 views

Using a user defined NormFunction in FindFit or NDSolve

I would like to use a different norm instead of the 2-norm in FindFit (Mathematica 9). For example, instead of using $$\sqrt{\sum (x_{\mathrm{model}} - ...

15 30 50 per page