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
0answers
70 views

Mapping the MATLAB SP Toolbox to Mathematica

We have some work and people where I am doing signal processing using the signal processing toolbox in MATLAB and it comes up how to translate one or another of the large number of functions in that ...
3
votes
0answers
147 views

Mathematica's Singular Value Decomposition different from another math engine [closed]

I’ve been working with SVD – singular value decomposition. Things weren’t working as expected. Thus, I looked over to Matlab and executed the following code: ...
1
vote
2answers
118 views

open Matlab sheet and plot

I have managed to import my data into mathematica, but I can't find a way to show the plot the way it was in the lab (Matlab automatically generated file usually show me a graph). Is there a way ...
4
votes
0answers
191 views

Matlab to Mathematica conversion [closed]

Is there a list of corresponding commands between Mathematica and Matlab, including Solve, NSolve, ...
0
votes
1answer
43 views

Lift and projection method in Least Squares Inverse Eigenvalue Problems [closed]

I need to implement the lift and projection method proposed by XUZHOU CHEN AND MOODY T. CHU in http://www4.ncsu.edu/~mtchu/Research/Papers/lsiep.pdf on page 7 in ...
0
votes
1answer
148 views

How to write this Matlab code in Mathematica

I have a small hiccup here. I am trying to write my Matlab code for a dynamical system in Mathematica. I have managed to get most of it except one part. The Mathematica code for the system is ...
3
votes
1answer
102 views

Mathematica does not import .mat file correctly [closed]

I have .mat file that contains a binary (0,1) matrix with size 100*100*100. I have used this syntax to import it in mathematica ...
11
votes
1answer
349 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: ...
0
votes
1answer
100 views

how to import a matlab 3 dimensional array into mathematica

I have created a three dimensional array "data" in matlab by using the following commands : ...
3
votes
1answer
340 views

Differences between FFT and analytical Fourier Transform

In MATLAB, if I perform an FFT on a simple Gaussian spot with a phase grating: ...
1
vote
0answers
85 views

Theodorus Spiral [closed]

If the successive hypotenuses of the Theodorus Spiral are getting longer but the difference between the lengths is getting smaller reducing the distance between windings to pi, why pi?
4
votes
1answer
203 views

What is the Mathematica equivalent for corr2?

What is the Mathematica equivalent for MATLAB's corr2, which gives the correlation coefficient of two 2D matrices?
0
votes
1answer
70 views

How to import columns of data (.mat file)

I have a two 100x2 .mat file and I would like to get the elements stored as pairwise entries i.e. something like data = [{a1,b1},{a2,b2}..{a100,b100}]. Can someone help me do this efficiently?
0
votes
1answer
169 views

TransferFunctionModel and BodePlot shows different result between Mathematica and Matlab

I was doing the TransferFunctionModel and BodePlot. But the result from Mathematica and Matlab are different. The function is as follows: ...
-3
votes
2answers
120 views

How to convert a matrix to MATLAB format? [duplicate]

I want to convert the following 16x16 matrix containing the variable n and some integers into matlab programming language: ...
2
votes
3answers
185 views

data manipulation in log-log scale

Say that I have the following: y[t_] := 2 + (2/10)*(1 - Exp[-t/11]) timedat = N[Table[{t, y[t]}, {t, 0, 10, 1/1000}]]; How is it possible to construct an ...
6
votes
1answer
3k views

What is the difference between Mathematica and Matlab? [closed]

I am totally a beginner to Wolfram products and I'm searching for a software to solve my math problems with. Like this math problem that I've solved using $\LaTeX$ in ...
1
vote
1answer
95 views

Transformation Matlab assignments to Mathematica expressions

From a simulation software, I obtain in a matlab file my algebro-differential equations in the following way : C_p_e = C_state/C_c; C_p_f = I_state/I_i; R_p_e = R_r*C_p_f; I_p_e = ...
2
votes
1answer
644 views
3
votes
0answers
159 views

The CorrelationMatrix is equal to corrcoef of Matlab?

How can I generate a matrix which is equivalent to the results of the "correlation coefficients" command (corrcoef) in Matlab? When I make a LinearModelFit, I can get a CorrelationMatrix, but is this ...
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 ...
2
votes
2answers
254 views

Having trouble translating Matlab `fsolve` into Mathematica

I searched the site and found that someone said FindRoot is equivalent to fsolve, however, without proper options, ...
2
votes
1answer
331 views

Making Mathematica function files like in MATLAB

I'm a MATLAB user trying to get familiar with Mathematica. I have long Mathematica sheet that spits out some matrices at the end after much math. I want to run a loop over couple of different initial ...
2
votes
1answer
101 views

How to apply different colors to different contours

I have searched the forum, I hope this isn't a duplicate question. I try to apply unique color for every contour line with the same elevation. In short, I want to create a MATLAB style contour plot. ...
13
votes
1answer
422 views

Any solution to transfer data between Python and Mathematica

I think Mathematica handles .mat file not very well, python is pretty good at this kind of jobs. In this site, there are plenty of question related to calling Mathematica from Python, or calling ...
1
vote
0answers
179 views

Is there an equivalent of “pmtm” of MATLAB?

Recently I'm spending my time implementing some patients' analysis using Mathematica Classify function. But I need to rewrite some MATLAB functions for computing ...
0
votes
0answers
119 views

Exporting the NDSolve to matlab with the argument

a = Table[Evaluate[y[x] /. sol], {x, 0, 10, 0.01}]; Export["a.mat", a]; works just fine but ...
2
votes
2answers
325 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 ...
3
votes
1answer
578 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 ...
1
vote
1answer
272 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 ...
3
votes
0answers
134 views

System Identification from test data

I've been looking for a way to model a simple SISO system from test data using Mathematica. Something similar to MATLAB's System Identification Toolkit, that estimates a transfer function from 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: ...
-1
votes
1answer
155 views

Small mismatch in theoretical vs MMA solutions of a damped harmonic oscillator differential equation

I solved the differential equation $$ \ddot y + 0.43 \dot y + y =0.1 \cos(2x), \quad y(0)=1,\ \dot y(0)=1 \quad(0) $$ using both the theoretical results from wikipedia and using MMA (I also tested ...
24
votes
1answer
15k 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?
4
votes
1answer
339 views

Using the variable in the MATLAB workspace using MATLink or any other packages

I have a program in MATLAB and after I run the program, I get some results in MATLAB's workspace. Now, I need to use these results in Mathematica. What I currently do is that I save the workspace as a ...
2
votes
1answer
433 views

Import symbolic variables from Matlab with MATLink

I'm trying to manipulate with Mathematica symbolic expression created in Matlab. I'm using the MATLink package, and I've succedeed in importing numerical variables, but not symbolic ones : ...
4
votes
1answer
439 views

ContourPlot3D using a Matlab function through MATLink

I have a Matlab function which accepts a 3 dimensional vector and returns a single number. I want to use this through MATLink to make a 3d plot. A unit sphere: ...
2
votes
1answer
223 views

'eps' equivalent in Mathematica

In Matlab there is a function 'eps'. eps Spacing of floating point numbers. D = eps(X), is the positive distance from ABS(X) to the next larger in magnitude floating point number of ...
3
votes
1answer
202 views

Importing data from Matlab, using data in “NSolve” and send the results back to Matlab

I have generated an image processing code in Matlab. It has several subroutines and in one of them, I should solve a system of 7 nonlinear equations. I use "fsolve" in Matlab to solve this system, ...
0
votes
0answers
273 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 ...
0
votes
0answers
116 views
0
votes
0answers
1k views

Converting a matlab program into Mathematica 10

I sought help from this entry at Calling MATLAB from Mathematica to see if I could CONVERT a mathlab program which simulates polymer dynamics that is provided at the download section at ...
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?
4
votes
4answers
358 views

Automatically growing lists as in MATLAB?

Is there a way to add elements to a list at positions outside the current list's length? Something equivalent to the following MATLAB code snippet: ...
7
votes
1answer
331 views

Porting code from MATLAB

I'd like to switch from MATLAB to Mathematica for my research in digital signal processing. I used Mathematica a lot during the '90s but I haven't used it since then, so I might as well be a complete ...
0
votes
1answer
347 views

How to prepare (copy/paste) data from Matlab?

What is the best way to get data from Matlab to Mathematica? For a new project I want to copy/paste a table (or part of it) of datas from Matlab to Mathematica. Copyed from Matlab it is: ...
4
votes
3answers
418 views

Approximate minimum degree permutation algorithm in Mathematica

In MATLAB there is a nice implementation of the so called AMD (approximate minimum degree permutation) algorithm named amd (see Online MATLAB Documentation). There is an alternative algorithm called ...
0
votes
1answer
139 views

Writing equations from Mathematica in Matlab [duplicate]

I would like to use mathematical equations directly in Matlab. I found one thread describing about a built in Matlab file i.e. ToMatlab.m. I am able to download this file, however, I could n't able to ...
5
votes
1answer
517 views

Mathematica-To-MATLAB Dictionary!

Is there a dictionary to translate Mathematica functions and commands to MATLAB?