Facing problem in printing real pole of transfer function of a system(Control System)
조회 수: 1 (최근 30일)
이전 댓글 표시
In the program given below I fail to obtaine real pole as title in intger format if anyone know please guide me
(In Output as title of root locus I wish to print 'Root locus of,1,2.00000+-2.00000i,1' rather output obtained as 'Root locus of,1,2.00000+-2.00000i,0-1.00000e+00' i.e real pole in exponetial form is printed which should be in real niumber)
num1=[1 -1];
den1=conv([1 1],conv([1 2+2j],[1 2-2j]));
G=tf(num1,den1);
P=pole(G);
Z = zero(G);
formatSpec='%s,%i,%f+%fi,%i';
a="Root Locus of ";
b='step response of';
figure(17)
rlocus(G)
p=sprintf(formatSpec,a,Z,P/1i,P(3,1));
title(p);
댓글 수: 2
답변 (1개)
Sam Chak
2024년 6월 27일
Hi @Arya
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1723741/image.png)
The following is what you wish to "print" out in the title in Integer format. However, please note that the title itself might be confusing, even to experts in control theory.
num = [1 -1];
den = conv([1 1],conv([1 2+2j],[1 2-2j]));
G = tf(num, den)
P = pole(G) % poles
Z = zero(G) % zeros
%% check what they
P/1i
P(3,1)
% formatting
formatSpec = '%s, %i, %.f+%.fi, %.f';
a = "Root Locus of ";
b = 'step response of';
figure(17)
rlocus(G), grid on % create root locus diagram
% check title
tit = sprintf(formatSpec, a, Z, P(1:2)/1i, -P(3,1))
title(tit);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Classical Control Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!