adding two ticks to form a horizontal line

7 visualizaciones (últimos 30 días)
shahriar sowad
shahriar sowad el 29 de Jun. de 2021
Respondida: shahriar sowad el 30 de Jun. de 2021
How do I add two ticks in the plot editor so that it gives me a perfect horizontal straight line?

Respuestas (2)

Jonas
Jonas el 30 de Jun. de 2021
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 comentarios
Jonas
Jonas el 30 de Jun. de 2021
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 el 30 de Jun. de 2021
it is showing error as undefined function yline

Iniciar sesión para comentar.


shahriar sowad
shahriar sowad el 30 de Jun. de 2021
note: my version of matlab is 2018a

Categorías

Más información sobre Computer Vision with Simulink en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by