from python to matlab
Show older comments
Accepted Answer
More Answers (2)
Loretta Laughrey
on 20 May 2020
0 votes
Just pass the variable in a function call:
In Python:
eng = matlab.engine.start_matlab("-desktop")
eng.cd(myscripts, nargout=0) # change to the folder with the scripts
results = eng.mymatlabscript(self.A, self.B, nargout = 0, async = False)
In MATLAB
function mymatlabscript(A, B)
Categories
Find more on Call MATLAB from Python in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!