正在加载图片...
5.1 Arithmetic matrix operations The basic arithmetic operations on matrices(and of course scalars which are special cases of matrices)are + addition subtraction multiplication right division left division exponentiation(power) conjugate transpose An error message occurs if the sizes of matrices are incompatible for the operation. Division is defined as follows: The solution to A*r=b is x A\b and the solution to x*A= b is x= b/A provided A is invertible and all the matrices are compatible Addition and subtraction involve element-by-element arithmetic operations; matrix mu tiplication and division do not. However, matlaB provides for element-by-element opera tions as well by prepending a. before the operator as follows multiplication right division left division exponentiation (power transpose(unconjugated) The difference between matrix multiplication and element-by-element multiplication is seen in the following example >>A=[12;34] 2 4 >>B=A*A 5.2 Relational operations The following relational operations are defined5.1 Arithmetic matrix operations The basic arithmetic operations on matrices (and of course scalars which are special cases of matrices) are: + addition - subtraction * multiplication / right division \ left division ^ exponentiation (power) ’ conjugate transpose An error message occurs if the sizes of matrices are incompatible for the operation. Division is defined as follows: The solution to A ∗ x = b is x = A\b and the solution to x ∗ A = b is x = b/A provided A is invertible and all the matrices are compatible. Addition and subtraction involve element-by-element arithmetic operations; matrix mul￾tiplication and division do not. However, MATLAB provides for element-by-element opera￾tions as well by prepending a ‘.’ before the operator as follows: .* multiplication ./ right division .\ left division .^ exponentiation (power) .’ transpose (unconjugated) The difference between matrix multiplication and element-by-element multiplication is seen in the following example >>A = [1 2; 3 4] A = 1 2 3 4 >>B=A*A B = 7 10 15 22 >>C=A.*A C = 1 4 9 16 5.2 Relational operations The following relational operations are defined: 6
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有