To label points in order in Matlab, you can use the text
function along with the num2str
function to convert the numeric labels into strings.
Here's an example code:
main.m345 chars16 lines
This will create a scatter plot of the points with the labels added in order. The text
function takes the x and y coordinates of the point as the first two arguments, the label as the third argument, and the horizontal and vertical alignment as the following arguments.
gistlibby LogSnag