Displaying a value in the plot
Afficher commentaires plus anciens
Hello,
I am plotting x vs y and I am taking out the maximum value of x with max(x)
Now I want to display this maximum value of x together with some text in a legend. I am trying to use num2str.. I am not sure if I am the right track.
Réponse acceptée
Plus de réponses (1)
dpb
le 4 Oct 2014
Well, we don't know if you're "on the right track" or not, either since you didn't show what you tried nor indicate what the problem was, if any...
num2str is fine (as would be sprintf) to use to format a value for display with additional text using the format string. To display it, you use text
You can also use annotation object for an arrow pointing to the value and so on.
doc text % for details
Catégories
En savoir plus sur File Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!