# All Questions

209 views

### Summing Over a Variable Number of Indices

I am trying to figure out the best way to include a variable number of indexes of summation in a program. For example: Suppose I want to define a function $g[n,s]$ that returns the sum ...
141 views

### Arguments for ChartElementFunction

I was reading the documentation for BubbleChart and I saw this example ...
139 views

### Simulation code performance tuning

The following simulation takes over 20 seconds for evaluation. I have difficulty re-coding it with Nest and Map or Compile functions to make it more efficient. Can some one help with this? The ...
174 views

### combining manipulate with “static” plot

Is there a way to show a plot of a "static" function as background for a manipulate panel ? In other words: I have put into a manipulate a trajectory (solution of a system of two differential ...
297 views

### Slow mixture fitting when having ill-conditioned covariance matrices. How to make it faster?

I'm using Mathematica 9.0 to fit multidimensional observations with a gaussian mixture. To do so I first adapted these steps to ensure that the mixture parameters are well defined (see ...
297 views

### Can ParametricNDsolve be used for coupled PDEs with 5 parameters?

I have a system of coupled PDEs with five parameters that I only know ranges for rather than explicit values, and I was wondering if I could define a parametric equation with ParametricNDSolve and ...
200 views

### Render dynamic Graphics objects static

As was discussed in the comments of another question (MathLink Graphical Output (Plots) to File), Graphcis objects produced by commands such as ...
168 views

### How to format the data in a table to have only numbers

This question is in continuation of my earlier query, how to store output of a function in a table for future use. I am able to store the output of my function in a table, however the table consists ...
1k views

### Why does Simplify[b-a] give -a+b and not b-a?

Simplify[b - a] results in -a + b. I prefer b - a, which is a bit simpler (3 symbols instead ...
141 views

### Determine types of input, output and internal variables in compiled functions

I am trying to speedup the computation of a longer function using Compile. For illustration consider the following short example: ...
974 views

### How to obtain the orthogonal matrix that diagonalize a symmetric matrix [closed]

I have a real symmetric matrix H which is in symbolic form, I need a matrix P that can diagonalize H; also P is orthogonal and its columns are the eigenvectors of H. How can I doing this in ...
138 views

### Using IntegerPartitions for distinct integers

What I would like to do is to find a way to test how many ways m distinct integers from the set {1,..., n} where ...
228 views

### 2D Fourier transform of a table - ArrayPlot issue

Recently, I have encountered an issue with ArrayPlot after performing a Fourier transform of a table. Picture presented above is an ArrayPlot of a 2D table. Using Fourier on this 2D table I obtain ...
260 views

### Resizing graphics with an inset when exporting

I am generating a number of graphics using Mathematica that contain text. Adding the text to the graphic has been a considerable challenge, but I have finally come up with the following: ...
47 views

### How to add a subplot in corner of plot? [duplicate]

How is something like the plot with subplot shown in this image achieved with Mathematica?
36 views

### Adding Elements to a List of Lists [duplicate]

I'm trying to do the following: Given a function f[x,y], I want to turn the list {{x1,y1},{x2,y2},...,{xn,yn}} into ...
69 views

### Converting a BSplinecurve to function

I am having two set of data. This is d000 and d001. The set d001 is a subset of d000. I am fitting the d000 data by using the BSpline of the d001 data according to the following commands: ...
129 views

This is a simple C++ program to send an expression to the_Mathematica_ Kernel and get its response. ...
497 views

### Multiply each element of an array by another array?

I would like to multiply an array by each element of another array, and am having a lot of trouble finding a built-in or automated method of doing. Here is an example of what I'd like to achieve: ...
376 views

### Fast way to get positions of “boxed” array elements?

Given a 2D array (arbitrary numeric / evaluates to numeric elements, simplified for examples, and can be arbitrary dimensions so long as the operation makes sense, I'm working with 2K X 2K in my ...
322 views

### If/else re-evaluate (integer only solutions)

I am trying to get Mathematica to do an if/else loop. I can get as far as the if, but I would like it to re-evaluate until only integer solutions are found. Here is what I have: ...
192 views

### Using Array Elements as Function Arguments

Suppose I have an array p = {a,b,c,d} and a function f that takes a variable number of arguments. I want to evaluate ...
205 views

### Defining an anonymous function using another function but with fewer arguments

In MATLAB you can use an anonymous function with another function to define a new function with fewer arguments as long you define the excluded argument before, e.g. ...
830 views

### Evaluate function of two variables using nested Do loops

Is there a more efficient way of evaluating a function of two variables on a rectangular grid the the following nested Do loops? ...
254 views

### Is there a function which instantly tells you whether an element is part of a list?

I have a very long list of numbers and I want to check whether there's a function (something that would look like PartOfQ[element,list]) that tells you immediately ...
70 views

### Markup of CDF file, e.g. highlighting text

Is it possible to markup (i.e. highlight or underline) text in a deployed cdf file and then save it? I think I know the answer (no), but since it seems a basic necessity for a document format that ...
119 views

### Using Graph to cull correlated lists

I have a set of lists that represent molecular descriptors. I need to identify which descriptors are highly correlated and eliminate the correlated pairs. I can represent the connectivity by ...
213 views

### How to apply a conformal map to a jpg (or other image)

I would like to apply a conformal map to a jpg. For example, the map $z\mapsto z^2$ to this image: http://thumbs3.ebaystatic.com/d/l225/m/mGyeriV7l-YArkeBd9oMUng.jpg Any help on how to do this?
181 views

### Solving a dynamic program via recursion

I'm trying to use recursion to solve a joint inventory/ dynamic pricing problem as in monahan, petruzzi and zhao 2004. I tried to solve for y[t] and ...
65 views

### MLEvaluate() Function Gives Error

I am trying to link my C++ program to Mathematica Kernel. I am trying to use the MLEvaluate() evaluate but I receive an error while compilation. My codes are as below: ...
554 views

### Suppress connection to Wolfram|Alpha when making unit conversions

I want to speed up calculations with unit conversions. I suspect primarily that some units evaluate from Wolfram|Alpha. Any way to prevent this automatically, so that Mathematica throws ...
442 views

### How to work with Experimental`NumericalFunction?

This question is intimately connected with previous one: "How to create internally optimized expression for computing with high WorkingPrecision?" Oleksandr R. correctly states in the comment: A ...
91 views

### Replace one order of derivative inside higher one

How could I replace for example: Derivative[2][f][x] by Derivative[1][g][x] where ...
83 views

### Simplifying complex expressions

I'm trying to work with complexes and I want Mathematica to know that all variables are real unless I explicitly assigned the variable with an I so I wrote: ...
165 views

### How to do this complex integration on the real line?

$m, r$ are parameters in the following integral: Integrate[z Exp[I z r]/Sqrt[z^2 + m^2], {z, -∞, ∞}] How to do this integration directly? The result should be ...
445 views

### Physics based Mathematica project ideas? [closed]

I am looking to make a physics based Mathematica project. Ideally the project would take around 12 hours, gathering any experimental data and analyse the findings. I'd have full access to university ...
149 views

### NDSolve with arrays and Tables of Equations and WhenEvent

I've been toying around with NDSolve for a while, and read through the website. By doing so I discovered that I could use it for vectors and arrays with much pleasure. So I wanted to write a simple ...
98 views

### Placing some controls above and some below plot

The code below is something I wrote quickly to simulate the problem I'm having with more complex code. I use Row (or Grid) to get the first 2 manipulate variables (a and b) on one line above the plot ...
195 views

### Generating a list of questions (simultaneous equations)

I am trying to create a list of simultaneous equations showing steps, where I only need to change a, b and the question number, and maybe a couple of minor things about q (where q is the factored ...
336 views

### Plot parametric solutions using Manipulate [duplicate]

I want to plot the parametric diagram of {y[t],z[t]}, in which I manipulate a parameter, ω, from $[1, 10 \pi]$. Here is what I have attempted, but I can't get a ...
121 views

### Multiple NIntegral with singularity

I need to compute the following integral FF[0]. When evaluating FF[0] Mathematica simply takes too much time. The problem may ...
152 views

### Open a Mathematica 9 notebook in Mathematica 8

I have the following question: Can I open a Mathematica 9 notebook in Mathematica 8? Are there compatibility issues?
537 views

### How to visualize slope fields of differential equations without vectors?

I'm looking to visualize slope fields of differential equations for my differential equations course. Every example I see draws them as vectors, adding unnecessary "arrows" that, to me, are visually ...
78 views

### Combine two functions in mathematica to get one image with two elements

I am trying combine this two functions into one piece in grid. ...
322 views

### Colorize a 3D distribution of points according to density

Suppose we have some random 3D distribution of points. I'll use the spherical ball defined below as an example and a starting point for the discussion here : ...
84 views

### Simplify rearranges equations?

I've been using Simplify/FullSimplify to simplify some nasty equations, and by and large it does well but sometimes it rearranges equations in an unhelpful way. ...
317 views

### A* algorithm for finding shortest path in a graph

FindShortestPath finds the shortest path between two vertices in an edge-weighted graph, allowing a choice between the Dijkstra and Bellman-Ford algorithms. In my (limited) understanding, both of ...
92 views

### Can I make a function which depends on several arguments which are not independent?

Here's a simple example Suppose have the permanent relation that z is proportional to xy^2, for real numbers s. z = s x y^2 Now, we are interested in ...