I need to speedup saving spectrogram images

I have 28 diseases every diseases has his own file in my computer to save the images on it..
I came with this code and its work but its it take time because my data are huge.
if ANNOTD(c)==0
spectrogram(M(LL:RR,1),'yaxis');
filename = fullfile('C:\Users\SCC\Desktop\task1\heart DB\spectrigram\NOTQRS',sprintf('NOTQRS-patient(%02d)-beat(%04d)-channel(1).jpg',patient_num,c));
exportgraphics(gca,filename);
if any one know pls help me

回答 (1 件)

Bjorn Gustavsson
Bjorn Gustavsson 2021 年 3 月 13 日

0 投票

Maybe you get some speedup by using print instead of exportgraphics. You can at least try and check that:
...as above
print('-djpg',filename) % instead of exportgraphics
Maybe other file-formats are faster to write to, perhaps you can try to save as .png-images too.
HTH

2 件のコメント

abdulrahman Hakami
abdulrahman Hakami 2021 年 3 月 14 日
i got this error
Error in spectrigram (line 308)
print('-djpg',filename) ;
Bjorn Gustavsson
Bjorn Gustavsson 2021 年 3 月 14 日
Oops. It should be:
print('-djpeg',filename)

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

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

製品

質問済み:

2021 年 3 月 13 日

コメント済み:

2021 年 3 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by