6
votes
3answers
144 views

Use Slider2D to add data points to a list

This bit of code sets up a list with the first entry already in it -- {{1,1}} ...
6
votes
1answer
143 views

How to reduce expressions with complex coefficients in the form of a+0.*I

I'm trying to get an eigenvalue equation in Mathematica, and the result is an expression with coefficients of the form a + 0. I. For example, Is there any clever ...
6
votes
1answer
146 views

How can I make sure all InputFields have values before processing a nb form?

This is a two part problem: I have a form that accepts both numeric and text inputs, then runs a function using a "process" Button. The issue I'm having is users that forget to fill out all of the ...
6
votes
1answer
481 views

CUDALink not working on Linux-64 and Asus GTX460

On my hardware I have a CUDA enabled video card an ASUS GTX460, yet Mathematica does not seem to recognize this. I have: CUDA Toolkit 4.1 CUDA SDK 4.0 NVIDIA Driver 295.49 on Sabayon Linux 64 ...
6
votes
2answers
581 views

Exporting images as .avi

Here's a list of images: images = Table[ExampleData[i], {i, ExampleData["TestImage"]}]; And according to the reference "Export exports a list of graphics, ...
6
votes
2answers
368 views

Starting NDSolve from intermediate time step?

I always wondered if I could start NDSolve from an intermediate time step. What I mean is, in the code sample below, if I were to run my solution from tmin=0 to ...
6
votes
2answers
129 views

How do I access the name of a list in a function?

Background: bar := {1, 1, 1}; foo[var_] := {Hold[var], 2 var} SetAttributes[foo, HoldAll] foo[bar] Result, as expected: ...
6
votes
3answers
797 views

How to properly plot a response of a transfer function in Mathematica?

I'm trying to display the output response of a transfer function in Mathematica with and without a compensator. The problem is very strange: while the transfer function compensate is showing well, the ...
6
votes
1answer
283 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
234 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
463 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
264 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
2k 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
481 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
572 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
798 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
285 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
386 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
3answers
545 views

Efficient image Import

I have several sets of 20 images I need to import. Each time they have different categories. "Name"<>"Cat"<>"No" Electric B 1 for example. I need to create lists that contain the images ...
6
votes
2answers
379 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
0answers
94 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
134 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
106 views

listplot very large numbers

Suppose we have the following function: NN = 150; W[n1_] := NN!/(n1 ! (NN - n1!)) (1/2)^n1 (1/2)^(NN - n1) Then we can Plot or Listplot it: ...
5
votes
3answers
307 views

Fast method for combining two lists

I have two lists, v1 and v2. Each element of the lists may be positive or negative. I want to create a list ...
5
votes
1answer
114 views

View the FullForm of ^^

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

Treat all variables as local in a module [duplicate]

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

Intersection of two splines

I have a collection of sets of points, each set defining the segment of a (nice) curve on the unit sphere $S^2 \subset \mathbb{R}^3$. The points are computed numerically. I now want to compute the ...
5
votes
1answer
204 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
298 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
278 views

How to make a filled Ellipsoid?

I want to make a filled Ellipsoid, but it seems Filling options doesn't work in Graphics ...
5
votes
1answer
102 views

How can I use Dynamic to run a script when a new file is added to a directory?

I have an external program saving files to some directory on my hard disc. I'd like to run a script that imports and runs a script on each file as it is added to the directory. Is there a simple way ...
5
votes
1answer
160 views

Selecting a list from a list of lists

In working through Programming Paradigms Via Mathematica (A First Course) I have come across this two part question: A permutation of length "n" is a list of the first n positive integers in ...
5
votes
1answer
126 views

Keeping vertexcoordinates after adding a new vertex

I want to add a new vertex to a graph, with fixed VertexCoordinates but when I use VertexAdd, the new graph does not have the VertexCoordinates of the previous one. ...
5
votes
1answer
238 views

Only final result from NDSolve

Finally I started to play with differential equations in Mathematica. And I have faced the problem, which seems too me so basic that I'm afraid this question is going to be closed soon. However, ...
5
votes
1answer
128 views

Manipulate keeps updating due to a function

Edit: This is apparently only a problem on a mac running OSX. I am trying to use the 'stretchText' function by Jens. But when I use it in manipulate, the output keeps updating without changing ...
5
votes
0answers
249 views

Mathematica inserts extra \left and \right for absolute values in LaTeX output

Type the following in a Mathematica DisplayFormula cell(other styles may also encounter this problem): Esc+l+|+Esc and Esc+r+|+Esc, and save as LaTeX. Note: See the difference of the character ...
5
votes
2answers
250 views

Why LibraryLink function crashes at a second time?

I'm trying link one of Lapack's function to Mathematica through LibraryLink, and the Library function works great at the first execution but crashes at the second time. Here is the code (modified ...
5
votes
1answer
321 views

Plot the boundaries of each piece of a piecewise function

I'm wondering how to plot the boundaries of each piece of a bivariate piecewise function. Lets take for instance the following piecewise linear function $B_{111}(x,y)$: ...
5
votes
1answer
150 views

Error messages from compiling the Piecewise function

The following works Compile[{{x, _Real}}, Piecewise[{{{0., 0.}, x > 5.}}, {1., 1.}]] but if I enter the Piecewise[...] in ...
5
votes
1answer
176 views

Generate regularly spaced points from the surface of simplexes

I need to generate regularly spaced samples (points) from the surface of unit simplexes with 2 or greater vertices or end points. I can generate random samples pretty straightforwardly: ...
5
votes
2answers
368 views

How to graph a series of coupled oscillators and watch the wave move along them

Here are the differential equations that set's up the 11 coupled oscillators. ...
5
votes
2answers
468 views

How to label axes in 3D plot adequately?

The following code produces plot with axes labels, which are jumping constantly. ...
5
votes
2answers
390 views

Transcendental equation with ContourPlot3D

I am still a newbie to Mathematica, so I am still getting used to the syntax and logic of the program - but I've been trying to do the following 3D plot: ...
5
votes
1answer
509 views

Wallis Formula and Pippenger Product---How do we get symbolic output?

The Wallis Formula computes $\frac{\pi}{2}$ OEIS and the Pippenger Product computes $\frac{e}{2}$ OEIS. Here is a combined formula: ...
5
votes
2answers
181 views

Better method for creating a tuple out of two lists

I just combined two lists using this method ...
5
votes
1answer
117 views

Is it possible to lower the bitwidth of (floating point) numbers?

The answer to this question will most probably be a definite no. Nevertheless, I would like to know whether it is possible to represent reals in the memory on less than the standard 32 or 64 bits ...

15 30 50 per page