Spectrogram of Audio Signal
163 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mangesh KAle
el 30 de Jul. de 2021
Respondida: Bjorn Gustavsson
el 30 de Jul. de 2021
Hello,
I have a audio Signal , and have to plot the spectrogram of that Signal.
After coding, I have Fs=44100 and Sound signal= 448064*1
How can I plot this as both the matrix size does not match.
Please help me out
Thanks in Advance
clc;
clear all;
close all;
[y,Fs]= audioread('1kdrei.wav');
dt=1/Fs;
y_1= y(:,1);
win=hamming(512);
windowsize=256;
0 comentarios
Respuesta aceptada
Bjorn Gustavsson
el 30 de Jul. de 2021
Have a look at the help and documentation of the spectrogram function. That allows you to calculate the spectrogram as such:
[S,F,T] = spectrogram(y(:,1),windowsize,windowsize/4,[],Fs);
Then you can plot the spectrogram using pcolor:
pcolor(T,F,log10(abs(S))),shading flat,colorbar
HTH
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!