I want to Put a number in plot function

4 Ansichten (letzte 30 Tage)
Ahmed Hassaan
Ahmed Hassaan am 10 Mär. 2012
hello ,
I drawn alot of hexagons shapes by for loop and it depends on the input ,I want to make in plot statement numbers for each hexagon can you help plz.
  1 Kommentar
Ahmed Hassaan
Ahmed Hassaan am 11 Mär. 2012
I just want to put a variable number in text()or plot()

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 11 Mär. 2012
I'd use sprintf()
myText = sprintf('The number is %.2f', theNumber);
text(x, y, myText);

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by