audio signal in spectrogram

조회 수: 9 (최근 30일)
Gokul
Gokul 2013년 3월 7일
답변: UMAIR RASOOL 2020년 8월 1일
Hello,
How to apply window function for a audio signal in spectrogram and compare it with the one without applying window function ?
  댓글 수: 1
Gokul
Gokul 2013년 3월 7일
Can some one explain with a example please

댓글을 달려면 로그인하십시오.

채택된 답변

Wayne King
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
Gokul
Gokul 2013년 3월 8일
I have assumed : x=wavread('tiggers.wav'); now how to analyze the spectrogram() for this with and without window? Is this the following way % without a window [S,F,T] = spectrogram(x); % with a hamming window win = hamming(200); [Swin,Fwin,Twin] = spectrogram(x,win,100,fs);
suggest please
Wayne King
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
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');

카테고리

Help CenterFile Exchange에서 Time-Frequency Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by