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

1
vote
1answer
90 views

An equivalent in Mathematica [duplicate]

Let's say I have a $n$x$m$ matrix $M$ in Matlab and I want to substitute the elements of $M$ that exceed $15$ for $-1$. In Matlab I just write M(M>15)=-1 and ...
7
votes
4answers
1k views

MATLAB To Mathematica: How to implement imshow()

I want to implement the MATLAB imshow function in Mathematica. This is a DensityPlot[] from Mathematica And this is ...
7
votes
3answers
2k views

Simulate MATLAB's meshgrid function

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

Does Mathematica have a command analogous to ode45 of MATLAB?

Does anybody know if Mathematica has an analogue of MATLAB's ode45 command? I need to solve a second order coupled ODE system of equations.
1
vote
2answers
621 views

Translating a “Point-to-Triangle” distance script from MATLAB to Mathematica

Update - Thanks everyone for your responses! After fixing a problem with vector normalization, the code below now works. I'm a new user, and I was attempting to port some Mathematica code from ...
5
votes
2answers
1k views

Equivalent of MATLAB's “hold on” function

I'm making an animation where the number of iterations is known. I tried using Dynamic, as I prefer updating in real time over generating data before plotting. I ...
2
votes
1answer
312 views

Export to mat file does not work

I use this command from the Mathematica documentation center Export["1.mat", {"t" -> {{1,2,3}},"u" -> {{4,5,6}}}, "LabeledData"] to save data as mat file ...
6
votes
1answer
844 views

Does Mathematica solve transfer functions differently to Matlab?

Please note this is an edit to the same question posed a few weeks back: I'm using Mathematica to derive the transfer functions for a three phase AC/DC inverter. Given below is the code for the ...
-5
votes
5answers
615 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): ...
0
votes
1answer
529 views

Calculating orbital period for the logistical map [closed]

I have the following MatLab code ...
12
votes
1answer
626 views

How can I obtain a zero-filled Fourier transform, as produced by MATLAB's fft?

The MATLAB FFT function, fft(X,n), can be used to return the n-point DFT. This effectively extends the original signal, X, to ...
10
votes
2answers
3k views

Is there a Mathematica equivalent to MATLAB's logspace? [duplicate]

Possible Duplicate: How can I get exactly 5 logarithmic divisions of an interval? I want to use Table to generate a list of items, but want the indices ...
0
votes
0answers
77 views

Export expression to Matlab [duplicate]

Possible Duplicate: Is it possible to export the equations from Mathematica to MATLAB? I like to export a Mathematica expression like.... ...
24
votes
1answer
14k 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?
1
vote
1answer
1k views

How to find local minima of a multivariate function with singularity?

I am working on a logistic regression problem which requires minimizing a cost function J[{theta0, theta1, theta2}, X, y] to find the optimal value for fitting ...
10
votes
2answers
4k 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 ...
41
votes
3answers
5k views

Calling MATLAB from Mathematica

How can I call MATLAB functions directly from Mathematica and transfer data/variables between the two systems?