Author Topic: something about audio(time,frequence) process  (Read 1002 times)

Offline dagobert1989

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
something about audio(time,frequence) process
« on: May 16, 2011, 08:03:15 PM »
Code: [Select]
[y,Fs,bits]=wavread('2.wav');
y=y(:,1);
sigLength=length(y);
Y = fft(y,sigLength);
Pyy = Y.* conj(Y) / sigLength;
halflength=floor(sigLength/2);
f=Fs*(0:halflength)/sigLength;
figure;plot(f,Pyy(1:halflength+1));xlabel('Frequency(Hz)');
t=(0:sigLength-1)/Fs;
figure;plot(t,y);xlabel('Time(s)');

I am a newbie.
Actually,Ido not understand this code,could anyone explain this to me?
Thanks a lot!

Matlab and SimuLink Development Forum

something about audio(time,frequence) process
« on: May 16, 2011, 08:03:15 PM »