How to divide wav file to frames (windows) with specific number of samples and plot time waveform and frequency spectrum using Matlab
Show older comments
I have wav file x with duration 10 seconds and sampling frequency 48kHz. How can I plot the time waveform showing only 1024 (or 2048) points? I guess I need to divide the file to frames, so after I should be able to "scroll" through the length of the audio and be able to see matching time waveform and frequency spectrum with the particular needed number of points. I wrote the code for the entire wav file, but I don`t know how to show specific area.
Thank you in advance!
Answers (1)
Azzi Abdelmalek
on 24 Jun 2015
If y is your audio signal, if you want to get the 10000 first samples
out=y(1:10000)
Categories
Find more on Pulsed Waveforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!