From: Atul Ingle on
Have you tried using spectrogram() with the 'F' vector input which makes it calculate the STFT at only those frequencies you want?
"Martin " <martin.bruha(a)gmail.com> wrote in message <hs4i1g$bgd$1(a)fred.mathworks.com>...
> Hi everyone
>
> I need a help with 'spectrogram' function. It makes FFT of my signal and plots it with time and frequency on the axis and the magnitude of frequency showed with color.
> The frequency range of FFT algorithm depends on the sampling frequency.
> In my case the sampling frequency is very high (160 kHz), but as the result I focus just on the range 0-60 Hz. Can I modify spectrogram to compute the fft only up to 60 Hz?
> I can change the range in Axes properties but in this way I loose the information of magnitude (displayed with color) because I just cut a very small piece from wide frequency range
>
> Thank you for your help and tips.
>
> Martin Bruha
From: Wayne King on
"Martin " <martin.bruha(a)gmail.com> wrote in message <hs4i1g$bgd$1(a)fred.mathworks.com>...
> Hi everyone
>
> I need a help with 'spectrogram' function. It makes FFT of my signal and plots it with time and frequency on the axis and the magnitude of frequency showed with color.
> The frequency range of FFT algorithm depends on the sampling frequency.
> In my case the sampling frequency is very high (160 kHz), but as the result I focus just on the range 0-60 Hz. Can I modify spectrogram to compute the fft only up to 60 Hz?
> I can change the range in Axes properties but in this way I loose the information of magnitude (displayed with color) because I just cut a very small piece from wide frequency range
>
> Thank you for your help and tips.
>
> Martin Bruha

Hi Martin,
In addition to Atul's suggestion, if it is just a matter of display, you can always scale the color axis. See the documentation for caxis.

Wayne

In addition to