The following command does mark the points with a square, but it does not put a value in (for example, (21,0), …).
X = [21 8 2 1 0]
Y = [0 1 2 3 4]
plot(X,Y,'k-s')
Which parameter should I add so all 5 point values come on the plot?
The values can’t be typed one by one as they can change, because they are random numbers.
You can display text on your plot by using the functions NUM2STR, CELLSTR, and STRTRIM to format the coordinate values into a cell array of strings and using the function TEXT to display them:
And your plot will look like this for the sample data above: