Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to write codes for bandpass filter using Matlab?

Status
Not open for further replies.

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;
 

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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top