Spectrogram of Audio Signal

163 visualizaciones (últimos 30 días)
Mangesh KAle
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;

Respuesta aceptada

Bjorn Gustavsson
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

Más respuestas (0)

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!

Translated by