# MATLAB: Is there a function to plot the points and display the coordinates of every point in MATLAB 7.8 (R2009a)

MATLAB

I want to plot some data in MATLAB and would like the coordinates of the points to be displayed beside the points in the figure automatically.

a = rand(1,5);plot(a);offset = 0.1;for i=1:length(a)text(i,a(i),['(' num2str(i),',' num2str(a(i)) ')']);end