I want to Put a number in plot function

1 view (last 30 days)
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 Comment
Ahmed Hassaan
Ahmed Hassaan on 11 Mar 2012
I just want to put a variable number in text()or plot()

Sign in to comment.

Accepted Answer

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

More Answers (0)

Categories

Find more on Dialog Boxes in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!