How to pass array between python and matlab, the matlab version is R2016b

4 ビュー (過去 30 日間)
peichang guo
peichang guo 2021 年 1 月 14 日
コメント済み: peichang guo 2021 年 1 月 15 日
Thank you very much .
My version of MATLAB is R2016b.
When I programme with python, I need to call Matlab.
There is an M file, whose input is a four dimensional array, 3*3*3*8, and whose output is also a four dimensional array, 3*3*3*8.
I have a python ndarray, for example, array = np.random.randn(3,3,3,8)
The two steps are needed:
①,pass the ndarray data to matlab, how toconvert python ndarray to matlab matrix 3*3*3*8?
②,pass the 3*3*3*8 matrix produced by matlab to python ndarray, how to convert matlab matrix 3*3*3*8 to python ndarray ?
Thank you very much .
  2 件のコメント
peichang guo
peichang guo 2021 年 1 月 15 日
Thank you very much. You are excellent.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

タグ

製品


リリース

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by