Changing Y limit of spectogram
54 views (last 30 days)
Show older comments
Hi, I am drawing spectogram of a sound signal by the following code:
spectrogram(seg,segmentLength,noverlap,segmentLength,sample_freq,'yaxis');
This code generates a spectogram with y axis of 0 to 7 kHz. I want to change the y limit to 0 to 3 kHz. I have tried both of the following. But, they didn't work.
ylim([0 3]);
set(gca,'YLim',[0 3]);
Can you please tell me how to change the y limit of a spectogram. Thansk
2 Comments
Answers (1)
Farid
on 4 Apr 2021
ylim([0 fmax]) worked for me perfectly, You probably have not used clc; clear in the beginning.
I know it's too late now but anyway :))
0 Comments
See Also
Categories
Find more on Array and Matrix Mathematics 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!