2 calculate the y value corresponding to each x point, for example: y = sin (x);
3 draw a curve with plot(x, y) command.
There are many contents in the use of the plot. You can look at the help of Matlab, which is very detailed and has examples ~