clear;
load whistle_data.mat
N = length(y);

Y = fft(y);

Y = Y(1:N/2)/(N/2);                   %% take first half of complex data
Y = abs(Y);                           %% take complex absolute value
freq = [0:length(Y)-1]/(t(end)-t(1)); %% frequency in Hz
loglog(freq,Y) 
