How to plot spectrogram on log frequency scale?
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Petrina
el 27 de Ag. de 2014
I've just starting using the spectrogram function, but I can not get it to plot on a log scale for the frequency axis that mimics the plot generated by logy.
Here's the basic spectrogram I am running:
%%Wv is wave signal of the word shore
% fs = 14700;
% framelen_samples = (20/1000)*fs;
% noverlap = 0.3* framelen_samples;
% NFFT = 2^nextpow2(framelen_samples);
% spectrogram(Wv,hamming(framelen_samples),floor(noverlap),NFFT,fs,'yaxis');
% colorbar;
Any suggestions?
1 comentario
Respuesta aceptada
Star Strider
el 27 de Ag. de 2014
Editada: Star Strider
el 28 de Ag. de 2014
T = 0:0.001:2;
X = chirp(T,100,1,200,'q');
[S,F,T] = spectrogram(X,128,120,128,1E3,'yaxis');
figure(1)
surf(T,F,abs(S))
view([0 90])
axis tight
xlabel('Time')
ylabel('Frequency')
set(gca,'YScale','log')
title 'Quadratic chirp'
This is the chirp signal from the spectrogram documentation. See the ‘Examples’ section for the linear scale of the same signal.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Time-Frequency Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!