Questions related to creating Mathematica functionality inspired by MATLAB--a proprietary numerical computing environment developed by MathWorks. This includes data import/export and other interoperability questions related to MATLAB programs, scripts, or related software.

learn more… | top users | synonyms

36
votes
3answers
4k views

Calling MATLAB from Mathematica

How can I call MATLAB functions directly from Mathematica and transfer data/variables between the two systems?
24
votes
1answer
12k views

Is it possible to export the equations from Mathematica to MATLAB?

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?
18
votes
2answers
4k views

Is there an equivalent to MATLAB's linspace? [duplicate]

Does Mathematica have an equivalent to Matlab's linspace? I want to make a list with "start", "stop" and "number of points". What is the neatest way of doing this?
7
votes
3answers
2k views

Simulate MATLAB's meshgrid function

Here is MATLAB's meshgrid. I came up with these implementations in Mathematica: ...
10
votes
2answers
3k views

How to get Matlab data imported with the same dimensions?

I have some Matlab image data with the following dimensions (output is from Matlab): >> size(im) ans = 86 86 3 45 The data imports just fine ...
11
votes
1answer
303 views

Does NRoots own an abstract counterpart? If not, can we write one?

We know when solving linear algebra equations, despite its abstract syntax, LinearSolve is much faster compared to Solve: ...
2
votes
2answers
169 views

NIntegrate over a list of functions

This question is the result of these other two questions. Question 1 and 2. I thought it would be better to ask a new question rather than deleting previous one. I think When ...
1
vote
1answer
179 views

Slow evaluation of NIntegrate when used as a pure function

I asked a perhaps related question here. Here is my code in below. The goal is that to define a function which must be integrated numerically. The function itself first is calculated over different ...
0
votes
0answers
181 views

Generate Matlab figure

I am currently working on a project. Because of lack of communication between my team mates and I, I did most of the work (and the graphical figures) in mathematica. Now, I have to pass all the ...
7
votes
2answers
1k views

Dramatic speed difference of code on Matlab and Mathematica

Background: I was trying to convert a Matlab code (fluid simulation, SPH method) into a Mathematica one, but the speed difference is huge. Matlab code: ...
3
votes
1answer
288 views

Numerical integration's speed

Consider this numerical integration of Bessel function: Do[NIntegrate[BesselJ[2, x], {x, 0, 10000}], {i, 1, 100}] // AbsoluteTiming {4.033403, Null} This is ...
-5
votes
5answers
562 views

Translating MATLAB's cell2mat into Mathematica

How I can define a function in Mathematica such that it acts same as the cell2mat command in MATLAB? Example (in MATLAB): ...