필터 지우기
필터 지우기

How to delete the ticks or change them in sgrid of rlocus ?

조회 수: 21 (최근 30일)
Younes Oudich
Younes Oudich 2023년 1월 30일
댓글: Younes Oudich 2023년 2월 16일
Hi everyone,
I am working with rlocus function in Matlab. I would like to show the grid for the daming ratio and natural frequency (thanks to sgrid function), but not all of their ticks as it makes the plots crowded. Any idea how to change the ticks or delete them please?
Kindest regards

답변 (1개)

Joel
Joel 2023년 2월 16일
I understand that you want to use the sgrid function with root locus to plot grid lines and be able to remove tick labels from the s-plane grid lines. MATLAB doesn’t offer us access to the properties of sgrid tick labels to make these changes but you can try a work-around.
‘sgrid’ offers an option where you can pass ‘zeta’ and ‘wn’ as inputs to it. ‘zeta’ is an array of constant damping factors and ‘wn’ is an array of constant frequencies. This will plot only the grid lines that you specify. Although it will omit some grid lines, you can use this to clean up your plot.
zeta = [0 0.3 0.7 1];
wn = [30 60 100 150 200 260];
sgrid(zeta,wn);
Alternatively, you can also change X and Y limits via Axes Properties to achieve a cleaner plot.
  댓글 수: 1
Younes Oudich
Younes Oudich 2023년 2월 16일
Thank you a lot for all the information and help! I will manage with what you suggested.
Kindest regards

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Time Series Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by