"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 well when using matlab, but an error occurs when using python.
I don't know why it happens.

Answers (0)

This question is closed.

Tags

Asked:

on 2 Sep 2020

Closed:

Rik
on 2 Sep 2020

Community Treasure Hunt

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

Start Hunting!