adding two ticks to form a horizontal line

8 次查看(过去 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