How to divide wav file to frames (windows) with specific number of samples and plot time waveform and frequency spectrum using Matlab

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!

Tags

Asked:

on 24 Jun 2015

Answered:

on 24 Jun 2015

Community Treasure Hunt

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

Start Hunting!