"Too Many Output Arguments" Error Calling imwrite from Python engine

python code
ecg_data_li = ecg_data.tolist() # np.array to list
ppg_data_li = ppg_data.tolist() # np.array to list
ecg_cwt_do = matlab.double(ecg_data_li)
ppg_cwt_do = matlab.double(ppg_data_li)
ecg_cwt_mat = eng.cwt(ecg_cwt_do)
ppg_cwt_mat = eng.cwt(ppg_cwt_do)
eng.wscalogram('image',eng.flipud(ppg_cwt_mat))
F = eng.getframe(eng.gca())
eng.imwrite(F['cdata'], 'test_final.png')
matlab code
wscalogram('image',flipud(cwt(ecg))
F = getframe(gca())
imwrite(F.cdata, 'test_final.png')
It works normally in matlab but not in python.
I don't know why it happens.

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Call Python from MATLAB 的更多信息

标签

重新打开:

2020-9-2

Community Treasure Hunt

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

Start Hunting!

Translated by