The simplest graphs to create are plots of points in the cartesian plane. For example:
>> x = [1;2;3;4;5]; >> y = [0;.25;3;1.5;2]; >> plot(x,y)The resulting graph is displayed in Figure 1.
Figure 1: A simple Matlab graph
Notice that, by default, Matlab connects the points with straight line segments. An alternative is the following (see Figure 2):
>> plot(x,y,'o')
Figure 2: Another simple Matlab graph