MATLAB: I want to Put a number in plot function

for loopplotplotting

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.

Best Answer

I'd use sprintf()
myText = sprintf('The number is %.2f', theNumber);
text(x, y, myText);