plot
2D line / marker plot.
Syntax
Section titled “Syntax”h = plot(y)h = plot(x, y)h = plot(x, y, linespec)h = plot(x1, y1, x2, y2, ...)Description
Section titled “Description”Creates a 2D line plot of y vs. x (or 1:length(y) if x is omitted). The linespec is a MATLAB-style style string like 'r--' (red dashed). Multiple x, y pairs draw multiple lines on the same axes. Trailing name-value pairs set graph properties.
Examples
Section titled “Examples”plot(1:10, (1:10).^2, 'r-')plot(x, sin(x), 'LineWidth', 2)