Plotting multiple Values on one axis
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!