audio signal in spectrogram

G
Gokul · Dec 13, 2021 · 2K views
Question
    Hello,   How to apply window function for a audio signal in spectrogram and compare it with the one without applying window function ?
Expert Answer
Profile picture of Neeta Dsouza
Neeta Dsouza PhD Expert
Answered Aug 24, 2026
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);

 

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!