# All Questions

405 views

### ReplaceAll inside an Iterator

I'd like to apply a set of rules to an expression defining the iterators of the table, like this: ...
269 views

### Why does Installing small caps fonts in OS X cause notebook Text cells to use that font?

I installed Adobe Type 1 Times Roman SC (small caps) and Times Roman Bold SC fonts on my Mac OS X system. Now every old or newly-created Text style cell in every ...
503 views

### How can I visualize features found in an image?

I am using Mathematica to explore the face detection feature of Core Image on Mac OS X Lion. To do this I have an Objective-C program which captures images from the iSight camera, runs face detection ...
283 views

### Getting Integrate to perform numerical integration

I am trying to calculate the mutual impedance of two antennas which is just a big integral. I defined my function in terms of my variable, but when I execute it, Mathematica runs for a while and then ...
3k views

### Computing eigenvectors and eigenvalues

I have a (non-sparse) $9 \times 9$ matrix and I wish to obtain its eigenvalues and eigenvectors. Of course, the eigenvalues can be quite a pain as we will probably not be able to find the zeros of its ...
636 views

### Efficiency of ParallelDo when a global variable./matrix is being updated

(Disclaimer: I realize that the addition of matrices a and b below can be done very fast just by typing a+b. The code below is just meant to illustrate behavior similar to what I observe in much more ...
678 views

### Arithmetic operation on the value returned by Solve

I want to modify the value that is returned by Solve. Example: SolC1 = Solve[Sin[ π x / L] == 1, x] {{x -> L/2}} I need to add n to x so that x becomes ...
1k views

### Animating a rotating disk

I have a system with 3 degrees of freedom that I want to know if it is possible to visualise with Mathematica in the two-dimensional $X-Y$ plane. I have a plane ...
339 views

### PrintTemporary in ParallelTable

I thought of a possible answer to Monitor doesn't work with ParallelTable but it doesn't work as I hoped it would. This accumulates print cells instead of deleting them as intended. Can it be ...
462 views

### Generate Random Text within a Rectangle

I would like to generate images such as the four below. That is: some text of different length fit within a Rectangle[] using ...
446 views

### Visualizing 3x3 spectrahedra

I'm trying to visualize the SDP cone over 3x3 matrices by plotting random 3d sections of it. Since each region is a system of inequality constraints, I'm using RegionPlot, but I think the plots would ...
117 views

### How to separate factors by dependent variables (arguments)?

How can I separate factors in an expression by their dependent variables? For example: expr = b * c[2] * a[x] * 2 * x^2 * g[x,y] * z[r] * D[q[x], {x, 4}]; I ...
176 views

### Plotting two recursive functions

I'm trying to plot two recursive functions (p and θ) on a map. So far I have: ...
180 views

### Signed power set of a list

Given {a, b, c, ...} with $n$ elements generate a list with $2^n$ elements. For example, if the list were {a, b, c}, then the ...
237 views

### Define a rule of derivative in NonCommutativeMultiply?

In tensor calculation, I need to do the following thing: Define a derivative operator Drv[fun,i], such that ...
248 views

### Element-wise list operation on list of lists [closed]

Suppose a function F operates on list A: $$A=\{a_1, a_2,\cdots, a_n\}$$ I have a list of lists, B: $$B=\{A_1, A_2,\cdots,A_m\}$$ Is there a syntax to specify that F should operate on members of B, ...
190 views

### How can I plot the frequency of list items?

How can I plot the frequency of list items such as?: ...
118 views

### Syntax for Table with a pure function

I have: g = #1^2 + a #2^3 / #1 & Now I wish to make a Table evaluating this from 1 ...
118 views

### Numerical error in Mathieu functions

Consider the MathieuCharacteristicA function, which is a piecewise function according to the documentation. The discontinuity happens at integer number. ...
144 views

### How to lookup by a string key after GroupBy? Inconsistent data type handling

This is relates to a bug that was introduced in 10.0.0 and fixed in 10.0.1 It also relates to an issue that has yet to be corrected. After applying GroupBy to ...
144 views

### Prevent iterator name from being confused with symbol passed into function body

I have a massive amount of code with lots of Table and Sum inside a Module. Each with their ...
120 views

### Passing a variable messages list to Quiet

I'm trying to build a Verbose option into some code but I'm having trouble passing to a Quiet statement a variable list of which messages I want to suppress. My ...
157 views

### Defining a function with parameters as variables

I have an expression V = (a[1] + a[2])b[1]. How would I define a function of a[1], a[2] and ...
108 views

### Numerical Functions Compatible with Regions Fail with MeshRegions and BoundaryMeshRegions

Given a MeshRegion: region = DelaunayMesh[RandomReal[1, {50, 3}]] We can numerically ...
174 views

### Mark Minimum Value in DensityPlot

Let's take this example: DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}] How do I retrieve the minimum value and position of the minimum of a plot from the ...
110 views

### How can I save a Manipulate's control settings to a dataset?

This is probably an extremely simple question. I have a manipulate that sets variables used to define an offset, amplitude, frequency and phase of a trigonometric function. ...
98 views

### InputAliases and SelectionPlaceholder issue in V10

Let's create an example and do the test: ...
217 views

115 views

### Systematic increase in runtime [duplicate]

When I run this simple code, which repeats many times the exact same operation (a differential equation), the runtime (given by Timing) increases systematically, ...
101 views

### Comparison Operation for Nested Matrices

I have a nested matrix n as bellow ...
115 views

### What is the syntax to conditionally suppress plotting in version 9?

In Mathematica 7 it is very easy to conditionally suppress plotting of individual lines using If: ...
382 views

### How can we create a histogram distribution from binning data?

HistogramDistribution takes a list of data points, creates a histogram from them, and returns this histogram in a form that can be used as a distribution. I ...
355 views

### Label Markers On ListPlot

I would like to make a scatter plot where each element corresponds to a certain energy. Each plot marker should have its corresponding element next to it. IE. The data point at -1.16187 should have ...
102 views

### SparseArray internal structure [duplicate]

According to the documentation: SparseArray is treated as a raw object by functions like AtomQ and for purposes of pattern ...
92 views

### FlipView can't handle CurrentValue[“MouseOver”]. Kernel crash

Is this code crashing your Mathematica session? (it can so look out :P) ...
136 views

### How to inherit options by scoping?

Consider the following example: you have a function framed producing a cell with a button that, when pushed, calls framed again. ...
181 views

### Simplification of integrals depending on a parameter [duplicate]

Assuming[Element[n, Integers], Integrate[Sin[x]*Sin[n*x],{x,0,Pi}]] returns 0, which is obviously wrong for n=1. ...
234 views

### Tooltip not showing fully - mostly whitespace

Here is an example of what I mean, the tooltip doesn't show most of the requested text ("example" in this case). There is more information about my code in my previous question: show contour area ...
212 views

### How to make a table of $\sum_{i=1}^n$?

I want to create a table of $\displaystyle \sum_{i=1}^n i^k$ for $1\le k\le 5$. The output I want to obtain is a TeXForm output as follows. \begin{align} ...
171 views

### View the FullForm of ^^

Why am I unable to see the FullForm of ^^ (the shorthand notation for BaseForm)? ...
325 views

### What is missing in this Mathematica Journal Article?

So I had been looking to solve a little tiling problem and Google turned up this Mathematica Journal Article and I noticed the code was both incomplete and incorrect, so... My Question is, What is ...
198 views

### Extracting data values from a plot

I found that the fact is very useful that a plot sometimes contains all the original data needed to reconstruct that plot. This is very helpful for me because sometimes I need to retrieve and analysis ...
290 views

### Convert array from {{…}} to “[[…]]”

I have made this function: conv01 = Map["["<>StringJoin@@Riffle[#,","]<>"]"&,Map[ToString,#,{2}],{0,1}]& to convert: ...
167 views

### Treat all variables as local in a module [duplicate]

In most languages, any variable defined inside a function is considered local. ...
187 views

### How to delete mirror symmetric point pair efficiently

Look at following pic There are five points, I can generate the following point pairs ...
113 views

### Apparently contradictory output from Series and D

I defined a function as: g[b_] := Integrate[f[n]Exp[-b DA (n.u)^2], n] Obviously D[g[b], b] /. b -> 0 gives ...
218 views

### How to deal with too much recursion

I have put together a very simple climate model based around four equations which define the state at time t based on time t-1, ...
264 views

### Why is Plot3D giving me a surface with gaps?

I am trying to get plot for the band structure for graphene. ...
461 views

### Find parameters of ODEs to fit solution data

Problem How to find the initial conditions x[0],y[0] and the optimal value of parameters ...
67 views

### Unequal and Compile

...

15 30 50 per page