Convert Matlab engine outputs to numpy arrays
古いコメントを表示
When I use MATLAB engine for python, the outputs of functions are not numpy arrays. Rather, they are matlab engine variables. Since there is not much to be done with those variable types in python, unless the variables are converted to numpy arrays, I was wondering if there is a [fast] way to convert them to numpy arrays.
回答 (1 件)
The MATLAB Engine for Python:
returns these data classes in Python:
np.asarray(output_array)
As an alternative, try this method:
1 件のコメント
Rishikesh Agrawani
2018 年 7 月 11 日
Excellent, it worked.
カテゴリ
ヘルプ センター および 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!