How to make a root locus plot square aspect ratio
20 次查看(过去 30 天)
显示 更早的评论
I have tried:
s = tf('s');
sysL = (s^2+1)/(s*(s^2+4));
rlocus(sysL);
v=[-4 4 -4 4];
axis(v);
axis('square');
But I get a message that says: Warning: This plot type does not support this option for the "axis" command.
I am using 2013b
0 个评论
采纳的回答
Star Strider
2015-10-7
编辑:Star Strider
2015-10-7
It does not support axis('square'). It does support axis('equal'), but that overrides your axis(v) call.
s = tf('s');
sysL = (s^2+1)/(s*(s^2+4));
rlocus(sysL);
v=[-4 4 -4 4]; axis(v);
hpos = get(gcf, 'Position'); % Get 'Position'
set(gcf, 'Position',[hpos([1 2 4]) hpos(4)]) % Set Width = Height
Experiment to get the result you want.
4 个评论
Star Strider
2023-11-8
Comparing them —
s = tf('s');
sysL = (s^2+1)/(s*(s^2+4));
figure
rlocus(sysL);
figure
rlocus(sysL);
hpos = get(gcf, 'Position'); % Get 'Position'
set(gcf, 'Position',[hpos([1 2 4]) hpos(4)]) % Set Width = Height
axis('equal');
It works as desired in R2023b.
.
更多回答(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!