FFT() Application for a real sound data
    1 view (last 30 days)
  
       Show older comments
    
    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 Comments
Answers (0)
See Also
Categories
				Find more on Filter Analysis in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!