How to pass values to matlab variables from python
Mostrar comentarios más antiguos
I want to pass some values from python to matlab variables. What package I should use for that. Please give me an example with that package.
2 comentarios
Stephen23
el 27 de Oct. de 2018
Easy solution: use scipy to save .mat files, and load those in MATLAB.
Or you could call Python from MATLAB using the CPython libraries.
Which would you prefer?
Sai Likhitha
el 29 de Oct. de 2018
Respuestas (1)
Mihir Thakkar
el 29 de Oct. de 2018
1 voto
As Stephen suggested, you can load values in a MAT-file. Please refer to the following link for an example. https://www.mathworks.com/matlabcentral/answers/329801-passing-from-python-to-matlab-a-cell-array-of-structures?s_tid=answers_rc1-3_p3_MLT. Additionally, you can call your Python module in MATLAB and use data as MATLAB variables. Refer to this documentation, it might be helpful. https://www.mathworks.com/help/matlab/call-python-libraries.html.
Categorías
Más información sobre Call Python from MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!