All Questions

6
votes
1answer
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: ...
6
votes
1answer
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 ...
6
votes
2answers
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 ...
6
votes
1answer
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 ...
6
votes
5answers
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 ...
6
votes
1answer
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 ...
6
votes
3answers
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 ...
6
votes
2answers
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 ...
6
votes
1answer
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 ...
6
votes
2answers
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 ...
6
votes
2answers
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 ...
5
votes
3answers
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 ...
5
votes
2answers
176 views

Plotting two recursive functions

I'm trying to plot two recursive functions (p and θ) on a map. So far I have: ...
5
votes
4answers
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 ...
5
votes
2answers
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 ...
5
votes
3answers
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, ...
5
votes
3answers
190 views

How can I plot the frequency of list items?

How can I plot the frequency of list items such as?: ...
5
votes
4answers
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 ...
5
votes
1answer
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. ...
5
votes
2answers
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 ...
5
votes
3answers
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 ...
5
votes
4answers
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 ...
5
votes
4answers
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 ...
5
votes
1answer
108 views

Numerical Functions Compatible with Regions Fail with MeshRegions and BoundaryMeshRegions

Given a MeshRegion: region = DelaunayMesh[RandomReal[1, {50, 3}]] We can numerically ...
5
votes
2answers
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 ...
5
votes
2answers
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. ...
5
votes
0answers
98 views

InputAliases and SelectionPlaceholder issue in V10

Let's create an example and do the test: ...
5
votes
1answer
217 views

Setting $RecursionLimit crashes Mathematica 10

I have encountered what I shall presume is a bug: setting $RecursionLimit repeatably crashes the Mathematica 10 kernel: ...
5
votes
1answer
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, ...
5
votes
2answers
101 views

Comparison Operation for Nested Matrices

I have a nested matrix n as bellow ...
5
votes
2answers
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: ...
5
votes
1answer
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 ...
5
votes
5answers
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 ...
5
votes
0answers
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 ...
5
votes
1answer
92 views

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

Is this code crashing your Mathematica session? (it can so look out :P) ...
5
votes
1answer
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. ...
5
votes
1answer
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. ...
5
votes
1answer
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 ...
5
votes
5answers
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} ...
5
votes
1answer
171 views

View the FullForm of ^^

Why am I unable to see the FullForm of ^^ (the shorthand notation for BaseForm)? ...
5
votes
1answer
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 ...
5
votes
2answers
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 ...
5
votes
6answers
290 views

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

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

Treat all variables as local in a module [duplicate]

In most languages, any variable defined inside a function is considered local. ...
5
votes
4answers
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 ...
5
votes
1answer
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 ...
5
votes
1answer
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, ...
5
votes
1answer
264 views

Why is Plot3D giving me a surface with gaps?

I am trying to get plot for the band structure for graphene. ...
5
votes
2answers
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 ...
5
votes
1answer
67 views

Unequal and Compile

...

15 30 50 per page