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)
2 Comments
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/474423-from-python-to-matlab#comment_730671
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/474423-from-python-to-matlab#comment_730671
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/474423-from-python-to-matlab#comment_730928
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/474423-from-python-to-matlab#comment_730928
Sign in to comment.