> Does anyone know how to make a code add drop
heuristic algorithm,
> or you ever been use that algorithm for data analyze.
>
> Please share.
What does this have to do with lowpass filter design?
-Jeff
Reply by Bonny Swara●May 31, 20102010-05-31
Hello,
Does anyone know how to make a code add drop heuristic algorithm, or you ever
been use that algorithm for data analyze.
Please share.
Thank you :)
Reply by aziz yemen●May 31, 20102010-05-31
HERE IS THE CODE WITH SAMPLE FILE ANC COMPARING BETWEEN THE FILTERED
AND NOISY SIGNAL
YOU CAN REMOVE WHATEVER IS NOT NECESSARY
[Yo,FS,NBITS1]=WAVREAD('1o.wav'); % read original signal
[Yn,FS,NBITS2]=WAVREAD('1n.wav'); % read corrupted signal
n1 =length(Yo);%Obtain the length of the original signal
n2 =length(Yn);%Obtain the length of the corrupted signal
% playing the sound of the Orgingal and Noisy signals
soundsc(Yo);
soundsc(Yn);
% Frequency Domain Plot
N1=n1;
N2=n2;
Sot(Yo); %use FFT to transform original signal into frequency domain
Snt(Yn); %use FFT to transform noisy signal into frequency domain
f1=(0:((N1/2)-1))/(N1/2)*(FS/2); %define freq. up to 1/2 sampling rate
f2=(0:((N2/2)-1))/(N2/2)*(FS/2); %define freq. up to 1/2 sampling rate
% The Parameters in Filter Specifications
fp00; % passband edge frequency
fs 00; % stopband edge frequency
df = (fs-fp)/FS;
N = 3.1/df; %the order of the filter
fc=0.5*(fs+fp) % the cut-off frequency
wnFS*2 % normailzed cut-off frequency
%The Required Minimum Attenuation is 30dB so we can use Hanning or Hamming
%or Blackman window
%Using Hanning window
h=fir1(62,wn,hann(63)); %designing the FIR filter
figure(3); stem(h);
fvtool(h) % The magnitude response
figure(6)
freqz(h); % The frequency response
Yf=filter(h,1,Yn) %Obtining the filtered Signal
% playing the filtered sound
%soundsc(Yf)
wavwrite(Yf,'1041110990f.wav');
%Ploting Orginal,Noisy and Filter signals'Frequency spectra
Sft(Yf); %use FFT to transform Filtered signal into frequency domain
f3=(0:((N1/2)-1))/(N1/2)*(FS/2); %define freq. up to 1/2 sampling rate
THE AUDIO FILES ARE ATTACED
--- On Thu, 5/27/10, Mahera wrote:
From: Mahera
Subject: [matlab] Lowpass filter design
To: m...
Date: Thursday, May 27, 2010, 6:00 AM
Dear all,
can anybody give me a simple MATLAB code for designing a lowpass FIR filter and
show impulse responses? Please help.