How to change the step size of rlocus
59 views (last 30 days)
Show older comments
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);
0 Comments
Accepted Answer
Paul
on 30 Oct 2021
Edited: Paul
on 30 Oct 2021
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 Comments
Paul
on 31 Oct 2021
Edited: Paul
on 31 Oct 2021
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.
More Answers (0)
See Also
Categories
Find more on Classical Control Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!