FFT() Application for a real sound data

1 回表示 (過去 30 日間)
TESFAW
TESFAW 2014 年 8 月 10 日
編集済み: TESFAW 2014 年 8 月 22 日
He! everybody
I am Tesfaw
I am confused to do my project on signal processing and I need help fro the
forum.The project is to determine the fundamental frequency of a Toyota
engine sound(idle) using user defined codes. My attempt is below.
Ns=samples=131072;
Fs=44100; %sampling frequency
%channel 1 ,data type double in .wav format
[z,Fs]=wavread('normal.wav',131072);
N=length(z);%length of the recorded sound
%conversion to binary
b=bin2dec(fliplr(dec2bin(0:N-1)))+1;
%make it bit reversed order
MC=y(b);
s=which('normal.wav');
set(gcf,'color',get
(0,'DefaultUIcontrolBackgroundColor'),'NumberTitle','off','Name',s,'Resize','on','Menubar','none');
%calculate the frequency
fr = (0:(N/128)-1)*Fs/N;
p = abs(MC(1:N/128));
[Amax,f] = max(p);
fprintf('Max.Magn. of Amp1. is %6.4f db/n and the freq f is %
4.2f\n',Amax,f);
pp=fftshift(p);
%plot the figure
plot(fr,pp,'b')
I need to determine the Amax(maximum amplitude) and the frequency
at which Amax occur
but the result from plot and from fprintf code is not the same
Please corret me
I am thankful for any help ! 10Q

回答 (0 件)

カテゴリ

Help Center および File ExchangeFilter Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by