1
vote
1answer
167 views

Liouville theorem demonstration

My goal is to create a demonstration of the Liouville theorem in 2D phase space. I made up an interesting potential energy function $U(x) = (x-4)x^3 + 27$, so that the minimal energy of system is ...
2
votes
3answers
213 views

Modify BinList to give elements indices in list instead of giving the list elements belonging to each bin

How could I use BinList to give elements indices in list instead of giving the list elements belonging to each bin ? Thanks.
4
votes
2answers
124 views

Creating a nested menu with OpenerView

I have a file with the following structure: ...
4
votes
1answer
293 views

Defining the Moyal Product in Mathematica

What would be the best way to define the Moyal Product, $f(x,p)\star g(x,p)$, in Mathematica? $f(x,p)\star g(x,p)$ may be written as $f\star ...
1
vote
0answers
98 views

Datastream to Mathematica

I currently use data from Thomson Reuters Datastream. With an add-in in Excel, the data can be requested. Because I need to use the data in Mathematica, and I need to update the data frequently: Is it ...
3
votes
1answer
496 views

Create a colorbar plot legend

I have the following list of parametric equations lst = {10*Cos[u]*Sin[v], 3*Sin[u]*Sin[v], 2*Cos[v]}; I define the following color function ...
0
votes
0answers
58 views

NMinimize of a Differential equation

f[kpr,tn,tv] is a Block for the Differential equations of a simple control loop with a PID-controller. It calculates the the response x[t] and integrates the t-weighted area under the response. The ...
4
votes
1answer
167 views

Using the OSX Cocoa-APIs from Mathematica via Link-Technology

I'd like to access Cocoa-API's (Foundation, AppKit) from Mathematica and have researched the following ways: CocoaLink: A deprecated Package by Rob Schlofield from 2009, which is still available on ...
0
votes
1answer
134 views

Problems with Solve

I am having a problem similar to the previous question here. Solve either takes forever (I assume infinity) to run or returns an error. I have tried various combinations of using Round, Chop, N and ...
0
votes
1answer
110 views

Forcing an integral to be solved in separate terms

Using Mathematica I want to solve an integral over a function that contains both determined and undetermined parts which looks like this: ...
8
votes
3answers
737 views

Why are functions called first-class objects in Mathematica?

I've heard lots of people say a function is a first-class object in Mathematica. "Everything is an expression, including function." "There is no distinction between functions and data." Having read ...
2
votes
2answers
130 views

Evaluating an If expression inside Dynamic

I was trying to display some value inside a InputField. Usually it looks like this: ...
15
votes
2answers
467 views

Quick way to use conditioned patterns when defining multi-argument function?

I have a simple function that is supposed to only accept numeric values (i.e. complex/real numbers and constant symbols e.g. Pi, E). $$f(a,b,c)=a+b+c$$ Edit: I should have chosen a less simple ...
11
votes
1answer
313 views

Dual graph of an arbitrary (planar) graph

Every planar graph has a dual. How can I obtain it with Mathematica? I know that GraphData provides the DualGraph property for ...
0
votes
0answers
87 views

Geometric Transformation not working - degenerate points?

I've successfully used FindGeometricTransformation to project the simplex triangle onto the x-y plane: ...
0
votes
0answers
50 views

Get rid of external library dependency

I am trying to generate C code for some functions, which I do not post in full because they are a few hundred lines long. The functions do nothing too fancy: a bunch of dot products, powers and roots. ...
2
votes
2answers
342 views

Finding Expectation of function of a Log-normal distribution

Say $Y=g(X)$ and $p_X = \frac{e^{-\frac{(\mu -\log (x))^2}{2 \sigma ^2}}}{\sqrt{2 \pi } x \sigma }$ is Log-normal density function: [Wiki] Find E[Y]? Since $E[Y] = \int_0^\infty y f_Y \ dy = ...
3
votes
1answer
67 views

How can I get the Predictive Interface to work in Slide Show environment?

It appears as though the predictive interface does not work in the Slide Show screen environment.
1
vote
0answers
124 views

How to make the animation rate lower in an exported GIF [duplicate]

I have a ".gif" figure exported from the following codes. 6 separated figures (frames) constitute a ".gif" figure. But the default time interval between each frame is less than 1 second. I hope to ...
1
vote
2answers
179 views

Stopping Mathematica from reordering expressions [duplicate]

I want Mathemtica to stop manipulating my polynomials! I mean, I want the output of Print[3 x + 5 + x^2] to be just $3x+5+x^2$, not $5+3x+x^2$ as Mathematica ...
0
votes
0answers
63 views

Parallel Licenses

I am using Mathematica 9 on a university computer. I am trying to use the basic commands for parallel evaluation. ProcessorCount evaluates to 4, but commands such as ParallelMap simply evaluate ...
3
votes
1answer
340 views

Gateaux (directional) derivatives and higher order differentials of a functional

I would like to calculate the Gateaux derivative of a functional (i.e. a function depending on functions). A simple example for the Dirichlet functional: $L(u(x))=\int_0^1 \frac{1}{2} (u'(x))^2 dx$ ...
4
votes
2answers
317 views

How to plot small values

I wonder, why small values (eg. 10^-1600) would not show on a plot? Here is a small example, where Evaluate gives a list of very small values and Plot does not show them, starting from x=20. ...
3
votes
3answers
249 views

Connect each point in the plot with all adjacent points

I have the following simple code. I need to connect each point in the plot with all adjacent points in vertical or horizontal line. ...
1
vote
2answers
73 views

Print argument of function that exceeds $RecursionLimit

Is there a way to print the argument of a function which results in a $RecursionLimit::reclim error? As an example, cosider the code ...
2
votes
1answer
107 views

Two controls to Manipulate all elements of a list

Say, I have a list list and I don't want to assign different names to all its elements. What I want to do it to be able to interactively manipulate any of the ...
4
votes
2answers
249 views

Drawing an arrow head on a curve

I am trying to create an illustration for a paper and export it to PDF. Here is the code ...
3
votes
1answer
214 views

Parallel kernel and front end

I have a piece of code which looks like this: ParallelTable[ Monitor[ Table[ <code here> ,{i,i1,i2]; ,i]; ] so basically a ...
9
votes
3answers
2k views

How to find the magnitude of a vector?

I'm doing this exercise in Wagner's book (p.78) , and this is my attempt: ...
6
votes
7answers
340 views

A problem involving classification of data

Toady, I encountered a problem while trying to classify certain data. I have the coordinates of six points. ...
6
votes
1answer
221 views

Finding corresponding vertex from 3d to 2d

I have this simple 3d data points: ...
7
votes
3answers
302 views

Implementing key-value associations in Mathematica 9 with inexact numbers for keys

I'm not sure of what type of problem my issue falls into, so I haven't been able to search forums with any success. If this has already been solved then my apologies! Essentially I'm trying to set a ...
10
votes
0answers
241 views

Calculating probabilities symbolically

Is there a way to solve for statistical quantities analytically/symbolically in Mathematica? example 1: Lets say that I want to do a calculation that requires Bayes theorem. I know p(a), p(b) and ...
0
votes
0answers
20 views

Manipulate Tutorials? [duplicate]

I am wanting to combine equations with sets of static data points in a manipulate and do the curve fitting by moving the slider bars on my independent variables. The best examples of this art may be ...
7
votes
1answer
362 views

On a Mac OS X, Ctrl-Backspace generates ascii code 8 (backspace), which is almost invisible but very annoying

When I press Ctrl-Backspace, Mathematica inserts what looks either like a tiny white space or sometimes is invisible. Actually, though, it is an ascii character code 8, also enterable in Mathematica ...
0
votes
1answer
169 views

Generate Random 3D Network using GraphPlot3D and loop

Instead of writing all this out I want to do the same thing with a loop and be able to manipulate n and k. The idea is to create a randomly generated network where n is the number of nodes and k is ...
1
vote
5answers
279 views

Write a number as the product of its two largest divisors

For even n >= 10 && n <= 98 I want to write n as the product of its two largest divisors (excluding ...
1
vote
1answer
82 views

Power series with decimal and arbitrary powers

Is there a way to make Mathematica do a series of the form: Series[ E^{\beta}$ , {x, 0, 1}] I have noticed that ...
17
votes
2answers
592 views

Difference (or intersection) of two convex polyhedra

I have two convex polyhedra stored in the following form: a set of vertices vertices = {{x1,y1,z1},...}, a set of faces, where each face is a convex polygon ...
1
vote
0answers
79 views

How to implement nested With as a single construct using functional programming (Fold)?

It is possible to define my own With construct where each local constant can depend on the previous defined local constants? I wish to replace something like this ...
4
votes
0answers
76 views

Possible JLink memory leak (during) object creation

Using MMA 9.0.1 on win7-64. When creating a large number of java objects I noticed memory being consumed in huge quantities (several Gb). This memory is returned/deallocated after my call ...
0
votes
2answers
455 views

Problems with NIntegrate

I'm having trouble to do the following numerical integrations: ...
2
votes
1answer
130 views

Generate conditions seems to not work [closed]

I am trying to compute the following integral Integrate[E^(I*k*Omega*t), {t,0,T}, GenerateConditions->True] for which Mathematica returns ...
1
vote
2answers
209 views

Generic Matrices

A multivariate Gaussian distribution for $k$ dimensions looks like this: $$\frac{1}{\sqrt{(2\pi)^k|\mathbf \Sigma|}}\mathbf e^{ -\frac 1 2 \mathbf x^T \mathbf \Sigma^{-1}\mathbf x }$$ $\mathbf x$ ...
0
votes
2answers
89 views

Manipulate expression overlaid on plot of data

I am trying to use the Manipulate function in Mathematica and want to plot an expression over a scatterplot of (x,y) data. I can programme the ...
1
vote
1answer
165 views

Checkbox Matrix

Is it possible to create a dynamically changing binary $n \times n$ matrix $A$, which appears to the user as a $n \times n$ matrix/table of checkboxes and the user can change the entries of $A$ by ...
0
votes
2answers
76 views

solving series of matrices by simply multiplication

I have a number of matrices {2*2} containing element in series ....so by what method I solve that ... ...
0
votes
3answers
244 views

How to display the value of a very small number instead of “0.” [duplicate]

I need to perform an integration. There is one particular value, which may be very small that is showing up as 0.. Is there any command in Mathematica 9 that will ...
0
votes
2answers
124 views

Cannot plot a list in ListPlot3D

I have this data files: ...

15 30 50 per page