Changing the x-axis from Time instead samples
Mostrar comentarios más antiguos
Hi everybody!
I'm a new user of Matlab, so I really appreciated your help. I'm doing the spectrogram of a chirp signal. Here is how I defined it:
fs = 1000;
t = 0:0.001:1;
y = chirp(t,60,1,20);
Later, I use the spectrogram as below, with a hamming window of 64 samples:
w1 = hamming (64);
spectrogram (y, w1, [], [], fs, 'yaxis');
The point is that when the graph is displayed, the x axis is in samples, and I would like to be in seconds. I try several things but I can´t do it. I atacched a copy of the graph.

So, I want that the x-axis be in time, not in number of samples. Can anybody help me? I apreciated so much,
Thanks!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Time-Frequency Analysis en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!