1. These are basic elements in MATLAB as well as in control design theory.
2. A general matrix A may be written like this:
Forming a matrix
1. In MATLAB, vectors and matrices will be typed as:
2. To separate rows, semicolon “;” is used.
3. To separate columns, comma “,” or space “ ” is used.
Selecting matrix elements
To get specific part of a matrix, type as follows:
Forming matrix from 2 vectors
A matrix can also be created from 2 vectors X and Y as:
It is very useful to create the vectors as:
where, xi is starting value,
xf is final value, and
dx is increment.
Delete rows and columns
Rows and columns can be deleted from a matrix using just a pair of square brackets .