To label the root of a function on a graph in Matlab, first identify the roots using the command `roots = find(abs(y) <= eps)` or `roots = find(abs(y) == min(abs(y)))` if there is a single root. This will provide the indices of the roots in the y vector. Next, plot the function using `plot(t, y, t(roots), y(roots), '*')` to visualize the function alongside the roots, which are marked with stars. Finally, use `label('y', 'roots')` to label the graph appropriately. This method effectively highlights the roots on the plot, although there may be alternative approaches available.