I have a signal, which was measured for 14.4 minutes (= 864 seconds). There are 192 measurements, so one measurement was done in every 4.5 seconds, which results in a 0.22 Hz sampling frequency if I am not mistaken. As far as I know, the highest frequency that could be seen on a spectrogram of this data should be 0.11 Hz, the Nyquist frequency. I would expect the spectrogram to have the y axis ranging from 0 and 0.11 Hz, but it looks like the axis is labeled between 0 and 110 mHz.
(And of course when I would like to zoom in to 0-2 Hz using the command "ylim([0 2]);" the axis changes to 0-2 mHz and shows vertical lines:)
Why is this happening? I would like to display the correct labels on y axis (and if possible, I would like to do this without manually changing the label texts to Hz, etc..). Am I doing something wrong?
The code looks something like this:
X = ... % timepoints (192) Y = ... % values (192) srate = 0.22; % one measurement in every 4.5 seconds = 0.22 hz winsize = ceil(length(X)/10); % this equals to 20 pupdil = pupdil-mean(Y); % subtract the "DC component" shift = ceil(length(X)/150); % this equals to 2 spectrogram(Y, rectwin(winsize), winsize-shift, winsize, srate, 'yaxis');