
clear

fs=100e3; %frequencia de amostragem
tfinal=5; %tempo final

t=0:1/fs:tfinal; %vetor tempo

f0 = 1;
ffinal = 1e4;
method = 'quadratic';
y = chirp( t, f0, tfinal, ffinal, method );  


%spectrogram(y,5000,4500)

[S,f,t_fft]=spectrogram(y,1000,900,[],fs);
surf(t_fft,f/1000,log(abs(S)))
shading interp
view(2)
xlabel('tempo (s)')
ylabel('frequencia (kHz)')