from python to matlab
10 views (last 30 days)
Wiley Mosley on 2 Aug 2019
Edited: Wiley Mosley on 2 Aug 2019
I believe you would want to utilize the matlab engine. If you are just trying to get the data in a format that you can then call a matlab function there are examples in the above link that should help you out.
You could possibly try sharing the session and maybe then variables in python would appear in the matlab workspace, but I have not tried this before.
More Answers (2)
Wiley Mosley on 1 Aug 2019
Loretta Laughrey on 20 May 2020
Just pass the variable in a function call:
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)
function mymatlabscript(A, B)