Current location - Training Enrollment Network - Mathematics courses - Matlab Mathematical Modeling and arithmetic progression
Matlab Mathematical Modeling and arithmetic progression
This is an example, please refer to:

% starting point

start _ x = 1;

start _ y = 1;

% step size

step _ x =- 1;

step _ y = 1;

Percentage of points to be calculated

num _ point = 5;

% produce arithmetic progression.

point _ x = start _ x:step _ x:start _ x+(num _ point- 1)* step _ x;

point _ y = start _ y:step _ y:start _ y+(num _ point- 1)* step _ y;

% display value

Display (point x)

Display (point y)

% drawing

Drawing (x point, y point)