Facing problem in printing real pole of transfer function of a system(Control System)
43 ビュー (過去 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 日 10:01
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!