Suppose I have a plot
x=1:0.01:10;
y=x+1;
plot(x,y)
Then I want to have a terminal value of y on the plot like "the terminal value of y is 11." Please advise.

 Respuesta aceptada

Star Strider
Star Strider el 27 de Abr. de 2020
Try this:
x=1:0.01:10;
y=x+1;
plot(x,y)
text(x(end), y(end), sprintf('Terminal value of y is %.0f \\rightarrow', y(end)), 'HorizontalAlignment','right')
ylim([min(ylim) 1.1*max(ylim)])
.

2 comentarios

alpedhuez
alpedhuez el 28 de Abr. de 2020
Does make sense.
Star Strider
Star Strider el 28 de Abr. de 2020
Thank you!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Productos

Versión

R2020a

Etiquetas

Preguntada:

el 27 de Abr. de 2020

Comentada:

el 28 de Abr. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by