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.

[SOLVED] how can I monitor the frequency response of this bandpass filter?

Status
Not open for further replies.

phoibos323

Newbie level 4
Joined
Feb 21, 2010
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,333
n=-10:1:10;
K=1;
f=5;
f0=697;
wc=2.*pi.*f;
w0=2.*pi.*f0;
hlp=(K./(pi.*n)).*sin(n.*wc);
hbp=(2.*cos(n.*w0)).*hlp;


here is my code, this code designs a digital FIR bandpass filter , I need to plot the frequency response of H'(w). Thank you.
 

Use excel
1) Make a column and call in input. Put numbers in this column.
2) Put the formula into another column and call this column output.
3) Draw a graph of input v output.

You should be able to see every thing (Bandwidth, -3db points etc.).
 

n=-10:1:10;
K=1;
f=5;
f0=697;
wc=2.*pi.*f;
w0=2.*pi.*f0;
hlp=(K./(pi.*n)).*sin(n.*wc);
hbp=(2.*cos(n.*w0)).*hlp;


here is my code, this code designs a digital FIR bandpass filter , I need to plot the frequency response of H'(w). Thank you.

Is hbp the impulse response of the filter, then you can find the freq. res. as freqz(hbp,1,1024,Fs), choose any value of sampling frequency as required.
 
thank you for the answers, when I use the freqz command as prompted in the last post the frequency response figure appears without any errors but the figure is empty, I have an error in mathematical aspect I guess but I could't figure it out.:-?

---------- Post added at 11:13 ---------- Previous post was at 10:50 ----------

n=-10:1:10;
K=1;
f=5;
f0=697;
wc=2.*pi.*f;
w0=2.*pi.*f0;
hlp=(K./(pi.*n)).*sin(n.*wc);
hbp=(2.*cos(n.*w0)).*hlp;


here is my code, this code designs a digital FIR bandpass filter , I need to plot the frequency response of H'(w). Thank you.


when I try to apply fft or ifft or freqz on "hbp" the result is NaN , not a number, what is the mathematical failure here? Thank you...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top