audio signal in spectrogram
9 次查看(过去 30 天)
显示 更早的评论
Hello,
How to apply window function for a audio signal in spectrogram and compare it with the one without applying window function ?
采纳的回答
Wayne King
2013-3-7
编辑:Wayne King
2013-3-7
You can supply the window argument as a vector.
Signal
t=0:0.001:2;
x=chirp(t,0,1,150);
Now to find the short-time Fourier transforms
% without a window
win = ones(200,1);
[S,F,T] = spectrogram(x,win,100,200,1000);
% with a hamming window
win = hamming(200);
[Swin,Fwin,Twin] = spectrogram(x,win,100,200,1000);
3 个评论
Wayne King
2013-3-8
[S,F,T] = spectrogram(x);
is not without a window. If you read the documentation, you'll see that syntax uses a Hamming window.
I've shown you how to not use a window function above. Use a vector of ones, or rectwin()
更多回答(1 个)
UMAIR RASOOL
2020-8-1
close all
clear all
clc
[y,Fs]=audioread('black_hole.mp3');
windowSize = 256;
windowOverlap = [];
freqRange = 0:Fs;
spectrogram(y(:,1), windowSize, windowOverlap, freqRange, Fs, 'xaxis');
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time-Frequency Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!