"Too Many Output Arguments" Error Calling imwrite from Python engine
Afficher commentaires plus anciens
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')
Errors do not appear when using matlab, but errors occur when using python.
ecg_data used in python and ecg used in matlab are the same data.
I don't know why it shows up.
Réponses (0)
Catégories
En savoir plus sur Call Python from MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!