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 CenterFile Exchange에서 Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by