Plotting multiple Values on one axis

조회 수: 1 (최근 30일)
Tom Daly
Tom Daly 2019년 11월 7일
댓글: KALYAN ACHARJYA 2019년 11월 7일
I need to plot a variety of numerator values for a single denominator value.
The numerator values needed are 0.1, 1, 10, 100, 1000. If possible on individual graphs for each numerator value
Given formula = k/s+a
Where num = k and den = s+a
Given K values to be (0.1, 1, 10, 100, 1000) and a (0.1, 1, 10, 100, 1000), with all k values to be plotted for each value of a
This is my best attempt at a single value for k. Is this right?
num=[0.1];
den=[1 0.1];
G=tf(num,den);
CIsys=feedback(G,1)
step(CIsys)
title('Step response of 0.1/(s+0.1)')
subplot(2,2,1),step(G),title('Step response 0.1/s+0.1')
grid on
subplot(2,2,2),impulse(G),title('Impulse Response 0.1/s+0.1')
grid on
subplot(2,2,3),pzmap(G),title('Pole-zero map 0.1/s+0.1')
grid on
subplot(2,2,4),margin(G),title('Bode Diagram 0.1/s+0.1')
grid on

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 7일
편집: KALYAN ACHARJYA 2019년 11월 7일
num=[0.1, 1, 10, 100, 1000];
den=[1 0.1];
for i=1:length(num)
G=tf(num(i),den);
CIsys=feedback(G,1)
step(CIsys)
title('Step response of 0.1/(s+0.1)');
step(G), hold on, title('Step response 0.1/s+0.1')
end
Do modification for all plots, I have shown one here
  댓글 수: 2
Tom Daly
Tom Daly 2019년 11월 7일
Worked perfectly thank you!
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 7일
Good to hear that, it works @Tom

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Frequency-Domain Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by