How can I save spectrograms as a high resolution image?

1 回表示 (過去 30 日間)
BGranato
BGranato 2018 年 5 月 25 日
編集済み: BGranato 2018 年 5 月 30 日
I have a song file and I would like to save its spectrogram as an image.
*How do I change the image dimensions to make a rectangle without reducing the resolution of the image? I wanted the shape to be something like pbaspect([30 1 1]), but when I do this I get a really tiny image (attached) *How do I smooth the spectrogram data? I'm guessing that because of the low resolution, my image is very very pixelated? Or maybe it's just the spectrogram output that isn't highly resolved?
This is the code I'm using, if anyone has any suggestions for how to make this better, I would greatly appreciate it! :)
read_audio = @audioread
[song, Fs] = read_audio(soundfile);
spectrogram(song, 4000, [], [], Fs, 'yaxis');
ylim([1 8])
caxis([-90 -85])
xlim([0 30])
pbaspect([30 1 1])
axis off
colorbar('off')
edit For my second question, just changing the second argument in spectrogram to 400 did the trick, I can now have smooth data yay

回答 (0 件)

カテゴリ

Help Center および File ExchangeTime-Frequency Analysis についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by