2. Basic XY Plane Drawing Command
Matlab is not only good at matrix-related numerical operations, but also suitable for scientific visualization. This section describes the multi-draw commands of the MATLAB basic XY plane and XYZ space, including one-dimensional curve and two-dimensional surface drawing, printing, and archiving.
PLOT is the basic function of drawing a one-dimensional curve, but before using this function, we need to define the X and Y coordinations of each point on the curve. The following example can draw a sinusoidal curve:
Close all; x = linspace (0, 2 * pi, 100);% 100 points of X coordinate
Y = sin (x);% corresponding to Y coordinate