How to obtain Two bode plots on the same figure (overlapping)??

Dear All,
I want to plot an array of data (code1) and a bode plot (code2) on the same graph/plot. Though i am able to get the individual semilog graphs(when i individually run them), i have been unsuccessful in obtaining both the plots on a single graph.
I would be extremely grateful, if someone could help me out. Thanks.
code1 :
semilogx([10 100 200 300 400 500 600 700 800 900 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 ], [2 2.3 13.3 26.3 -6.46 -11.7 -15.6 -18.8 -20.9 -23.4 -25.2 -37.9 -44.8 -50 -53.9 -57 -59.6 -62 -64 -65 ]);
code2 :
num=[0 1];
den=[0.000000495 0.000033 1];
system1=tf(num,den);
bode(system1)
best wishes
janmay

Antworten (1)

venkat vasu
venkat vasu am 30 Jul. 2012
Bearbeitet: Walter Roberson am 30 Jul. 2012
subplot(1,2,1);
plot(code1);
subplot(1,2,2);
plot(code2);

3 Kommentare

Thanks for the quick reply venkat, but i am looking for an overlapping/single plot. Much like this:
num=[0 1];
den=[0.000000495 0.000033 1];
system1=tf(num,den);
num=[0 1];
den=[0.000000495 0.000033 0.5];
system2=tf(num,den);
bode(system1, system2)
But what i want is my two sets of data and a bode plot in a single graph, not a subplot.
Best wishes
janmay
I was able to solve the problem, a Prof. at my university helped me.
Here's the code.
semilogx([10 100 200 300 400 500 600 700 800 900 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 ], [2 2.3 13.3 26.3 -6.46 -11.7 -15.6 -18.8 -20.9 -23.4 -25.2 -37.9 -44.8 -50 -53.9 -57 -59.6 -62 -64 -65 ]);
hold on
num=[0 1];
den=[0.000000495 0.000033 1];
system1=tf(num,den);
bode(system1)
best wishes
janmay
This doesn't work, the bode overwrites the semilogx.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with Control System Toolbox finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 30 Jul. 2012

Kommentiert:

am 1 Mär. 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by