% The second example we consider is a bat sonar signal, recorded with a
% sampling frequency of 230.4 kHz and an effective bandwidth equal to
% [8 kHz, 80 kHz].
% First, load the signal from the MAT-file bat.mat :
echo off
I can't find ../data/bat.mat
name of the directory where bat.mat is :
1 2 3
| Fe=230.4; t0=(0:2047).'/Fe;
clf; plot(t0,bat); xlabel('Time [ms]');
axis([t0(1) t0(2048) -900 800]); grid; |
% From this plot, we can not say precisely what is the frequency content
% at each time instant t ; similarly, if we look at its spectrum,
%
% press any key to continue...
pause;
1 2 3 4 5
| dsp=fftshift(abs(fft(bat)).^2); dsp=dsp/max(dsp);
f0=(-1024:1023)*Fe/2048;
plot(f0,10*log10(dsp)); xlabel('Frequency [kHz]'); ylabel('Squared modulus (dB)');
axis([0 Fe/2,-30 0])
title('Spectrum (dB)'); grid; pause |
% we can not say at what time the signal is located around 38 kHz, and at
% what time around 40 kHz. Let us now consider a representation called
% the pseudo Wigner-Ville distribution, applied on the most interesting
% part of this signal :
%
% press any key to continue...
1 2 3
| tfrpwv(hilbert(bat),8:8:2048,256,tftb_window(127,'hanning'),1);
Pseudo Wigner-Ville distribution
10 20 30 40 50 60 70 80 90 100 % complete in 0.03 seconds. |
Partager