1 / 21

Matrix Operation (II)

Matrix Operation (II). ผศ.ดร.อนันต์ ผลเพิ่ม Anan Phonphoem http://www.cpe.ku.ac.th/~anan anan@cpe.ku.ac.th. Arithmetic Operation. Element-by-Element Matrix Operation. a 1 a 3 a 2 a 4. 2 1 0. b 1 b 3 b 2 b 4. A=. B=. A=. B=. 3 4 -1 5. 30 8 -1 0.

thisbe
Télécharger la présentation

Matrix Operation (II)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Matrix Operation (II) ผศ.ดร.อนันต์ ผลเพิ่ม Anan Phonphoem http://www.cpe.ku.ac.th/~anan anan@cpe.ku.ac.th

  2. Arithmetic Operation • Element-by-Element • Matrix Operation

  3. a1 a3 a2 a4 • 2 • 1 0 b1 b3 b2 b4 A= B= A= B= 3 4 -1 5 30 8 -1 0 (10)(3) (2)(4) (1)(-1) (0)(5) C= A.*B = C = A.*B (a1)(b1) (a3)(b3) (a2)(b2) (a4)(b4) = = Element-by-Element

  4. a1 a3 a2 a4 b1 b3 b2 b4 A= B= (a1)(b1)+(a3)(b2) (a1)(b3)+(a3)(b4) (a2)(b1)+(a4)(b2) (a2)(b3)+(a4)(b4) C = A*B = 10 2 1 0 • 4 • -1 5 A= B= • 50 • 3 4 (10)(3)+(2)(-1) (10)(4)+(2)(5) (1)(3)+(0)(-1) (1)(4)+(0)(5) C = A*B = = Matrix Operation

  5. x x x x y y X = Y = z z x x x x y y Matrix Multiplication (I) X * Y = 2 x 2 2 x 1 2 x 1

  6. x x x x x x y y X = Y = x x x x x x z z z y y Matrix Multiplication (II) X * Y = 3 x 1 3 x 2 2 x 1

  7. y y y y y y y y y y y y X = x x x x x x Y = z z Matrix Multiplication(III) X * Y = 1 x 2 1 x 3 3 x 2

  8. y y y y y y y y y y y y x x x x x x x x X = Y = z z z zz z Matrix Multiplication(IV) X * Y = 2 x 3 2 x 2 2 x 3

  9. x x x x x x X = y y y y y y Y = z z z zz z z z z Matrix Multiplication(V) X * Y = 3 x 3 3 x 1 1 x 3

  10. y y y y y y X = x x x x x x Y = z Matrix Multiplication(VI) X * Y = 1 x 1 1 x 3 3 x 1

  11. x x x x x x y y y y X = Y = x x x x x x Matrix Multiplication (VII) X * Y = Error Message 3 x 2 1 x 2

  12. y y y y y y z z z x x x x x x X = Y = X .* Y = Matrix Multiplication (VIII) X * Y = Error Message 1 x 3 1 x 3

  13. Special Matrix

  14. eye(3) = 0 0 00 1 0 0 01 0 0 0 1 1 1 1 11 1 1 1 1 ones(3) = zeros(2) = zeros(1,3) = 0 0 0 Special Matrix

  15. Zero Matrix I = 1 0 0 01 0 0 0 1 0 0 0 00 0 0 0 0 Special Matrix 0 A = A 0 = 0 I A = A I = A

  16. Order = 2 Order = 3 Polynomial f(x) = a1xn + a2xn-1 + a3xn-2 + …+ anx + an+1 n Degree = Order = Example: y = 3x2 + 4 y = 12x3 + 2x2 + 1

  17. Polynomial Coefficient f(x) = a1xn + a2xn-1 + a3xn-2 + …+ anx + an+1 [ a1 a2 a3… an-1 an an+1 ] y = 12x3 + 2x2 + 1 [ 12 2 0 1 ]

  18. y = 5x4 + 6x3 + 3x2 + 2 b = 4a3– 6a2 T = x3 + x2 + x + 1 Polynomial Coefficient [ 5 6 3 0 2 ] [ 4 -6 0 0 ] [ 1 1 1 1 ]

  19. Roots of y 1 , 2 Roots of polynomial a = [ 1 -3 2] y = x2– 3x+ 2 = (x – 1) (x– 2) c = roots(a) = [ 1 2 ] T = roots( [ 1 -3 2 ] )

  20. Polynomial of roots r = [ 1 2 ] Roots of y = 1 , 2 >>poly(r) ans = 1 -3 2 (x – 1) (x– 2) P = poly([ 1 2 ]) y = x2– 3x+ 2

  21. roots ( [1 –3 2 ] ) poly ( [1 2 ] ) Poly ( ) roots ( ) y = x2– 3x+ 2 [ 1 2 ] [ 1 –3 2 ] (x – 1)(x – 2)

More Related