"Too Many Output Arguments" Error Calling imwrite from Python engine
Show older comments
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.
Answers (0)
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!