1
vote
0answers
167 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 ...
1
vote
1answer
167 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 ...
2
votes
1answer
164 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 ...
0
votes
1answer
156 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 ...
9
votes
3answers
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 ...
2
votes
1answer
91 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: ...
1
vote
1answer
368 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 ...
2
votes
1answer
109 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 ...
0
votes
0answers
74 views

Simultaneously fitting data sets with many variables as free parameters

I found a partial answer in the documentation centre, but would like to expand on it and know how can I fit multiple sets of data and extract the parameters from them. It is an eigenvalue problem - We ...
1
vote
2answers
158 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 ...
3
votes
2answers
186 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: ...
0
votes
1answer
143 views

how to store output of a function in a table for future use [closed]

I am new to Mathematica and if this is a simple query - please excuse me for the same. I am trying to solve a equation which is a function of two variables. From the solution, I need to store the ...
0
votes
0answers
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?
2
votes
0answers
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 ...
0
votes
0answers
56 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: ...
1
vote
0answers
87 views

Read expression from Mathematica via Mathlink C++

This is a simple C++ program to send an expression to the_Mathematica_ Kernel and get its response. ...
5
votes
2answers
409 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: ...
9
votes
8answers
345 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 ...
1
vote
2answers
165 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: ...
1
vote
2answers
87 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 ...
3
votes
2answers
119 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. ...
0
votes
1answer
394 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? ...
7
votes
2answers
246 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 ...
3
votes
1answer
65 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 ...
3
votes
0answers
105 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 ...
0
votes
1answer
141 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?
2
votes
2answers
153 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 ...
1
vote
1answer
53 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: ...
7
votes
3answers
435 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 ...
19
votes
1answer
317 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 ...
0
votes
2answers
90 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 ...
0
votes
1answer
58 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: ...
3
votes
1answer
130 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 ...
2
votes
2answers
358 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 ...
0
votes
1answer
89 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 ...
2
votes
2answers
88 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 ...
3
votes
3answers
180 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 ...
1
vote
3answers
198 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 ...
0
votes
1answer
102 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 ...
0
votes
0answers
118 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?
2
votes
2answers
448 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 ...
0
votes
2answers
50 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. ...
3
votes
3answers
253 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 : ...
2
votes
1answer
77 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. ...
3
votes
0answers
232 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 ...
0
votes
1answer
74 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 ...
0
votes
1answer
144 views

Initial and boundary value errors

NDSolve::ivone: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >> I keep getting this, ...
0
votes
2answers
150 views

How to divide a notebook into sections? [closed]

I've seen some very nicely formatted Mathematica notebooks with sections, explanatory text, etc., but I can't figure out how to do something similar. The documentation is not especially helpful here ...
1
vote
1answer
75 views

Make duplicate string then join two strings together in a table

I have two lists of data, dataA and dataB. ...
1
vote
2answers
142 views

How to find the complex number has least and greatest modul satisfying a given condition?

Let be given the complex number $z$ satisfying the condition $|z-2+2i|=2\sqrt{2}$. I want to find the complex numbers $z$ so that their modul obtain least and greatest value. I tried. Put $z = x + y ...

15 30 50 per page