How can I use the text and sprintf functions to label a point on a graph?
60 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Andy
am 25 Okt. 2014
Kommentiert: Star Strider
am 25 Okt. 2014
I need to label a point with its coordinates (x = 5/6, y = 6/9) correct to 4 decimal places. The line y consists of one plot, hence the (x, y, str). When I try the following code no label appears on my graph.
x = 5/7:5/7;
y = % equation of line
plot(x, y);
str = sprintf('%0.4', 5/7, 6/9);
text(x, y, str);
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Axis Labels finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!