How to change the scale of the x-axis & y-axis?
970 views (last 30 days)
I have written a code which used to plot the spectrogram of a signal. This line was to get the spectrogram:
[s,f2,t] = spectrogram(xc,win,noverlap,FFT_LENGTH,fs,'yaxis');
Then I used imagesc to plot the spectrogram: imagesc(t,f2,20*log10(abs(s)));
Everything is working fine except I want to decrease the scale of the x-axis & y-axis. How can I do that?
Aron Magesh on 5 Jul 2020
For changing the axis scale use the following function:
for example low=10,high=100 and interval=5
Kevin Chng on 22 Oct 2018
Adam on 23 Oct 2018
Edited: Adam on 23 Oct 2018
is likely what you need if you want finer resolution to get rid of step-like features, but how was anyone to interpret that from you just keep repeating 'change the scale'? You need to be a lot more precise to get a faster answer.
Or since you are creating a spectrogram you could just use a finer discretisation of the frequencies and/or the times used to compute it.