customizing point names in matlab
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ananya Malik
am 11 Jan. 2017
Bearbeitet: Stephen23
am 11 Jan. 2017
Is there a way to rename the point names in matlab plots? I know the following code will label the points from 1 to k.
for i=1:length(k)
text(xk(i),yk(i),num2str(i))
hold on
end
Is there a way to add a label to the points eg. s1,s2.... sk? TIA.
0 Kommentare
Akzeptierte Antwort
KSSV
am 11 Jan. 2017
x = rand(5,1) ;
y = rand(5,1) ;
s = repmat('s',5,1) ;
n = [1:5]' ;
str = strcat(s,num2str(n)) ;
plot(x,y,'.r') ;
text(x,y,str)
Siehe auch
Kategorien
Mehr zu Annotations 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!