How to scale the axes for root locus?

조회 수: 14 (최근 30일)
John Doe
John Doe 2020년 8월 2일
답변: Jaswanth 2024년 10월 17일
Hello everyone. I am trying to use the command rlocfind to find a gain value.
rlocus(num,den)
axis([-22 3 -15 15])
zeta=0.7;
Wn=1.8;
sgrid(zeta, Wn)
[K poles] = rlocfind(num,den);
The code output is :
I can easily pick a point greater than 1.8 with the cursor here.
figure
axis([-22 3 -15 15])
rlocus(numo,deno)
sgrid(zeta,Wn)
[Kp poles]=rlocfind(numo,deno)
The code output is :
In this portion, I cannot even see where is my point of 1.8. What I sense is, the axis scaling is wrong here, that is why it is not showing up. Is there any way or command so that the graphs will be squeezed like the first output automatically without any axis scaling? I do not want to manually set all these axis scaling values and seems like a hassle to me.
Any solution? Thanks in advance!

답변 (1개)

Jaswanth
Jaswanth 2024년 10월 17일
Hi,
To ensure that the root locus plots are automatically scaled without manually setting the axis limits, you can use the “axis tight” command after plotting the root locus. This command adjusts the axis limits to fit the data tightly.
This command adjusts the axis limits to the range of the data, squeezing the plot to fit all relevant points and lines. It eliminates the need for manually specifying axis limits, allowing you to see all important features of the plot, including points of interest like Wn = 1.8.
I hope the solution provided above is helpful.

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by