# All Questions

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, ...
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 ...
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 ...
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 ...
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: ...
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 ...
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: ...
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 ...
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 ...
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 ...
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) ...
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. ...
122 views

### Use NotebookWrite with Graphics?

I am trying to use NotebookWrite to paste a plot into another notebook. The code looks something like: ...
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 ...
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 ...
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 ...
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 ...
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 ...
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: ...
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: ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 \ddot{x} + 2 \beta \dot{x}+ \omega_0^2 \sin ...
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 ...
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: ...
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: ...
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 ...
191 views

### FrameLabel not printing completely

Running this code: ...
191 views

### Distance between two functions satisfying a constraint

My problem is that I have two functions that are described as follows: ...
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 ...
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. ...
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. ...
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, ...
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, ...
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 ...
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 ...
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? ...
955 views

### How do I save my animation/manipulation in pdf?

Is it possible to presserve my animation and manipulation plots in the pdf?
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 ...
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 ...
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 ...
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: ...
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 ...
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 ...
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, ...
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$ ...
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}} - ...