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.

Plotting Frequency Response

Status
Not open for further replies.

andrew257

Member level 2
Joined
Feb 22, 2007
Messages
42
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,648
plotting frequency ads

Hi All

I wish to plot various frequency responses it matlab all on the same plot.

I can plot them individually but not together, can anyone reccomend how to do this.

This is my code:

b=fir1(n,wn,rectwin(n+1),'noscale');
[h,w]=freqz(b,a,512);
plot(w/pi,(abs(h);

i wish to plot the same responses but only for different windows. e.g compare rectangular,triangular and hamming windows using the same cuttoff frequency and order.

cheers

Andrew
 


hi
just write 'hold on' after the first plot
or use
' plot(x1,y1,x2,y2....)'
 

hi, thanks for the fast reply,

would this work

b=fir1(n,wn,rectwin(n+1),'noscale');
[h,w]=freqz(b,a,512);
plot(w/pi,(abs(h);
'hold on'
b=fir1(n,wn,triang(n+1),'noscale');
[h,w]=freqz(b,a,512);
plot(w/pi,(abs(h);
'hold on'
b=fir1(n,wn,hamming(n+1),'noscale');
[h,w]=freqz(b,a,512);
plot(w/pi,(abs(h);

cheers

Andy
 

Medra is right.. you can use plot(x1,y1,x2,y2....) .. for plotting on the same figure..
 


hi
hold on
without coloms ( ')
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top