|
|
Matrix OperationsWhat are the basic matrix operations, and what are the complementary Matlab commands?Consider the following matrix A=[3 0; 8 -1] and matrix B=[2 2; 2 2]. Addition and Subtraction Two matrixes can only be added if they are of the same size.
Multiplication The order (A*B or B*A) matters. The number of columns in the first matrix and the number of columns in the second must be equal.
Exponents and Logarithms Exponent of 2 or some other >> 2^3 >>8 Exponent of 2.7222 or e >>exp(2) >> 7.3891 Matrix Exponent >>expm(A) >> [20.0855, 0 ; 39.4353, 0.3679] Inverse of Exponents >> log(exp(1)) >> 1 Inverse of Power of 10 >>log10(100) >>2 Inverse of Power of 2 >>log2(8) >>2 Normal If a vector represents a line, then normal is the length of the line. If a vctor represents a plane, then normal can be thought of as the area but not equivalant to the actual area.
|