how to mention function on plot?

 Respuesta aceptada

Star Strider
Star Strider el 11 de Oct. de 2015
One option is to use the legend function:
x=-pi:0.1:pi;
y1=sin(x);
y2=cos(x);
plot(x,y1,x,y2)
legend('sin(x)', 'cos(x)', 'Location','NW')
There are other options using the text function if you want to display different text labels.

3 comentarios

Image Analyst
Image Analyst el 11 de Oct. de 2015
For example, you could use text() to place a string near your curve, then use annotation() to have an arrow point from the string to the curve.
rising falcon
rising falcon el 12 de Oct. de 2015
thank you.this is helpfull answer
Star Strider
Star Strider el 12 de Oct. de 2015
My pleasure.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 11 de Oct. de 2015

Comentada:

el 12 de Oct. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by