How to pass values to matlab variables from python
조회 수: 10 (최근 30일)
이전 댓글 표시
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
Stephen23
2018년 10월 27일
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?
답변 (1개)
Mihir Thakkar
2018년 10월 29일
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!