Professional Documents
Culture Documents
Chapter 2: Matrix Computation and Linear Algebra
Chapter 2: Matrix Computation and Linear Algebra
1
Today’s outline
2
Variables: short and long format
To start matlab : by double clicking on the Matlab shortcut
3
Polar and complex representation
- let’s take a complex number
4
5
Vector arithmetic operations
- a row vector can be written:
6
- a column vector can be written:
7
8
Vector functions
9
10
Matrix definition, indexing and matrix operations
- To define matrix in matlab , we use:
Square bracket, then the element of 1rst row (separated by commes or space, we
step the second row by a semi column, …etc. then we end by the squar bracket.
Example:
12
- We can add or delete a vector or a sub-matrix. example:
13
Matrix operations element by element
14
Matrix functions
- Demision and transpose are given such as:
15
- inv the inverse of matrix, normmatrix (or vectors) norm, rank number of
linearly independent vectors
16
- det determinant, diag diagonal elements or A(i,i) and eig the Eigen values
17
- repmat containing n copies of A in the row and column, triangular upper
/lower the upper / lower elements of A
18
Elementary matrices
19