From: Wayne King on
"Godzilla " <godzilla(a)tokyo.edu> wrote in message <hvms5h$13l$1(a)fred.mathworks.com>...
> "Wayne King" <wmkingty(a)gmail.com> wrote in message <hvl2cr$5tc$1(a)fred.mathworks.com>...
> > Andy Hennig <phoenixasche(a)gmx.net> wrote in message <1991842386.376203.1277034399566.JavaMail.root(a)gallium.mathforum.org>...
> > > Hi Wayne,
> > >
> > > thank you for the reply, I had looked up "window" and "fs" and understood it like: fs/2 should denote the limit for the highest frequency and window/2 should denote the limit for the lowest frequency detectable by the function "spectrogram".
> > >
> > > Let's say I cut my data in small enough pieces, made the spectrograms and added them up alltoghether ... then I had solved the vector-is-too-long-to-process-issue.
> > >
> > > Now, how can I compress the output-images (-> from "spectrogram") along one axis only, as I would like to downsize the time(!)-resolution from maybe 0.001s to 1h while maintaining the frequency resolution? Cause if I didn't do so, I could print it out using it as for wallpaper. :D
> > >
> > > (This chart I made some days ago trying to explain my problem: [url=http://img715.imageshack.us/img715/9851/spectrumfrage3.png]link[/url]. The blue/green-boxes denoting the pieces into which I would cut my vector as you suggested. Whereas the colored arrows beneath denote passing time, which - in the output - I need to have compressed.)
> > >
> > > Thank you,
> > > andy
> >
> > Hi Andy, the frequency resolution of the spectrogram is Fs/N where Fs is your sampling frequency and N is the length of your window. If you want the same frequency resolution, you have to fix this ratio as constant. So, if you reduce the sampling frequency, which is what you do by downsampling, you have to reduce the value of N as well. For example, assume your sampling frequency is 1 kHz. If you have a window length of 1000 points, then your frequency resolution is 1 Hz (Fs/N). If you reduce your sampling frequency by a factor of ten, you have to reduce N by a factor of ten as well to maintain the frequency resolution at 1 Hz.
> >
> > Be careful though, downsampling can introduce aliasing depending on the frequency content of your data.
> >
> > Wayne
>
> have you consider using a log plot for the frequency axis?

Hi Godzilla, I don't see how a log plot of frequency is going to address the OP's question. Taking the log doesn't affect the frequency resolution of the spectrogram and frequency steps in the short-time Fourier transform don't form a geometric sequence.

Wayne