How to extract amplitude data from wav. file?

Hi, I have some wav. files of echolocation calls of bats that I need to analyze. I want to plot the amplitude as a function of time. Can someone point me in the right direction? An online tutorial would help a lot.
Thanks!

 Accepted Answer

KSSV
KSSV on 20 Aug 2017
Edited: KSSV on 20 Aug 2017
Doc audioread..
[y,fs] = audioread(filename);
dt = 1/fs;
t = 0:dt:(length(y)*dt)-dt;
plot(t,y);
xlabel('Seconds');
ylabel ('Amplitude');

3 Comments

Thanks for helping. I tried the code, but I ran into a problem... Do you know what's wrong? Sorry, I've never used matlab before...
Note that the variable is Fs not fs....this is a typo error...type Fs instead of fs..
Ohh, got it. Thanks

Sign in to comment.

More Answers (0)

Products

Asked:

on 20 Aug 2017

Edited:

on 20 Aug 2017

Community Treasure Hunt

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

Start Hunting!