hi on the fdatool i designed a fir hamming filter and generated the m file and got this Fs = 48000; % Sampling Frequency N = 5000; % Order Fc1 = 1000; % First Cutoff Frequency Fc2 = 15000; % Second Cutoff Frequency flag = 'noscale'; % Sampling Flag % Create the window vector for the design algorithm. win = hamming(N+1); % Calculate the coefficients using the FIR1 function. b = fir1(N, [Fc1 Fc2]/(Fs/2), 'bandpass', win, flag); Hd = dfilt.dffir(b); i have sinwave signal using x=sin(2*pi*f*t1); but how do i pass the signal though this filter i tried this x2 = x.*b; and just got a cross and i dont know what Hd is used for does anyone have any ideas on how to pass the signal though the filter thanks james bond
Filter design
Started by ●January 20, 2007
Reply by ●January 21, 20072007-01-21
"james_bond" <james_bond_890@HOTMAIL.COM> wrote in message news:k_KdnfDZOLkH_S_YnZ2dnUVZ_riknZ2d@giganews.com...> > hi > > on the fdatool i designed a fir hamming filter and generated the m > file and got this > > Fs = 48000; % Sampling Frequency > > N = 5000; % Order > Fc1 = 1000; % First Cutoff Frequency > Fc2 = 15000; % Second Cutoff Frequency > flag = 'noscale'; % Sampling Flag > % Create the window vector for the design algorithm. > win = hamming(N+1); > > % Calculate the coefficients using the FIR1 function. > b = fir1(N, [Fc1 Fc2]/(Fs/2), 'bandpass', win, flag); > Hd = dfilt.dffir(b); > > i have sinwave signal using x=sin(2*pi*f*t1); but how do i pass the > signal though this filter > > i tried this x2 = x.*b; and just got a cross and i dont know what Hd > is used for > > does anyone have any ideas on how to pass the signal though the > filter > > thanks > > james bondYou need the FILTER command which does convolution (or something similar). F. -- Posted via a free Usenet account from http://www.teranews.com