adding two ticks to form a horizontal line

조회 수: 8 (최근 30일)
shahriar sowad
shahriar sowad 2021년 6월 29일
답변: shahriar sowad 2021년 6월 30일
How do I add two ticks in the plot editor so that it gives me a perfect horizontal straight line?

답변 (2개)

Jonas
Jonas 2021년 6월 30일
if you want to add a horizontal line to you plot you can use yline. if you want a ytick at that specific value you can write
yline(3.3614);
yticks(unique([yticks() 3.3614]));
  댓글 수: 4
Jonas
Jonas 2021년 6월 30일
yes, add the two lines at the end of your code.
note that you just need one 'hold on' command, this will have the effect that all later plots are added to the current figure
shahriar sowad
shahriar sowad 2021년 6월 30일
it is showing error as undefined function yline

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


shahriar sowad
shahriar sowad 2021년 6월 30일
note: my version of matlab is 2018a

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by