Plots
Completion requirements
1. Linear Plot
The plot command is used to create two dimensional plots. The simplest form of the command is:
where x is the array of independent variable, and y is the array of dependent variable.
MATLAB creates the plot automatically, scales the axes, marks the points and connects them with a straight line. It uses its default settings of line types, color, etc.
>> plot(x,y)
MATLAB creates the plot automatically, scales the axes, marks the points and connects them with a straight line. It uses its default settings of line types, color, etc.
>> x = 1:2:50; >> y = x.^2; >> plot(x,y) >>