Sep 26, 2007 #1 N nnm Junior Member level 3 Joined Aug 28, 2007 Messages 28 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,283 Activity points 1,438 how do i write codes for bandpass filter using matlab wb = sin(2*pi*3500*t); wc = sin(2*pi*8000*t); tx = wb.*wc;
how do i write codes for bandpass filter using matlab wb = sin(2*pi*3500*t); wc = sin(2*pi*8000*t); tx = wb.*wc;
Sep 29, 2007 #2 R rancohen_2000 Advanced Member level 4 Joined Aug 24, 2006 Messages 119 Helped 23 Reputation 46 Reaction score 1 Trophy points 1,298 Activity points 1,958 Re: Plz Help me .... here is an example how to build BPF in Matlab. fs=100e6; % frequncy sample s_filter=cfirpm(15,[0 0.3 0.5 0.6 0.8 1],@bandpass); % return filter h=fvtool(dist_filter,1); % plot the filter set(h,'NormalizedFrequency','off'); % turn off normalize set(h,'Fs',fs); if you want to pass signal thru the filter you need to convulate it. output=conv(signal_in,s_filter); % it's in time domain
Re: Plz Help me .... here is an example how to build BPF in Matlab. fs=100e6; % frequncy sample s_filter=cfirpm(15,[0 0.3 0.5 0.6 0.8 1],@bandpass); % return filter h=fvtool(dist_filter,1); % plot the filter set(h,'NormalizedFrequency','off'); % turn off normalize set(h,'Fs',fs); if you want to pass signal thru the filter you need to convulate it. output=conv(signal_in,s_filter); % it's in time domain