Struct contents reference from a non-struct array object when calling python

1 回表示 (過去 30 日間)
Orel Levy
Orel Levy 2017 年 12 月 28 日
コメント済み: Orel Levy 2017 年 12 月 28 日
I have a python function that receives 4 arrays. when trying to call the function from matlab, i get the error:"Struct contents reference from a non-struct array object". anyone knows how should i use the py. command to call python?
My code is: addpath C:\Python27
px = num2str(rand(2,10));
py = num2str(rand(2,10));
cx = num2str(rand(2,10));
cy = num2str(rand(2,10));
py."MyPythonCode.main(px,py,cx,cy)"

回答 (1 件)

KSSV
KSSV 2017 年 12 月 28 日
  1 件のコメント
Orel Levy
Orel Levy 2017 年 12 月 28 日
I have, and tried using the same prefix, however, i still get the same error.

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

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by