How to change the step size of rlocus

60 次查看(过去 30 天)
Hi,everyone.I plot a locus with the function "rlocus",but the step size is a little long than I want. I want to change the default step size but I don't know how to do it. I would be appreciated if anyone can give me some advice,thank you all!
Below is the code
clear;
sys1=zpk([-1,0.25],[-2,0.5+0.5j,0.5-0.5j],1);
rlocus(sys1);

采纳的回答

Paul
Paul 2021-10-30
编辑:Paul 2021-10-30
rlocus() takes a second argument that defines the gains, k, where the points are plotted.
rlocus(sys,k)
Specify k to make the points on the locus as far apart or as close together as you want.
doc rlocus
  3 个评论
Paul
Paul 2021-10-31
编辑:Paul 2021-10-31
That second parameter, k, is a 1d-array of all the gain values that you want the root locus to cover. When you specify k as a single number, rlocus() plots just one point for each root. For example:
sys=tf(1,[1 5 1]);
k = 0:.1:10;
rlocus(sys,k)
Make the interval in k smaller to fill in the gap at the breakpoint
k = 0:.01:10;
rlocus(sys,k)
Values in k don't kneed to be equally spaced. So you can vary the spacing with k to get more or less closely spaced points on the locus in region of more or less interest.
k = [0:.1:3 3.01:.01:6 6.1:.1:10];
rlocus(sys,k)
Also, if you're going to post screen captures, please shrink them down by quite a bit. I have to scroll up/down and left/right by quite a bit and can't see the whole picture all at once.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Classical Control Design 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by