ข้ามไปที่เนื้อหาหลัก

บทความ

กำลังแสดงโพสต์ที่มีป้ายกำกับ matrix

howto Rotate Rotation matrix from relative frame back to reference frame [ subsequent rotation ]

As we know that the angle from 'pitch, roll, yaw' is measured from first reference frame . Even though, we have subsequent frame. For example, if we rotate 90 degree around x axis, then rotate 90 degree around y axis. we noticed from the last couple that it is rotate 90 around y axis of the first frame ( not -90 degree around z axis in the secound frame ) We can use rotation formula, like R = RyRx However, in some case, if we want to use the the rotated frame as a reference frame, ( for example, -90 degree around z axis in the second frame, in this case ), we can do that and the formula to convert from rotated frame to the first reference frame is BRB -1 or BRB T ( because the rotation matrix is orthonormal ) for example, from the example above we rotate 90 degree around x axis and then 90 degree around y axis, so R = RyRx octave:1> [0 0 1;0 1 0;-1 0 0]*[1 0 0;0 0 -1;0 1 0] ans = 0 1 0 0 0 -1 -1 0 0 if we want to rotate 90 around x axis and then -90 degree arou...

เรื่อง matrix ที่อาจจะลืมกันไปแล้ว

Rank ของ matrix Rank ของ matrix A คือ จำนวน independent columns (หรือ rows) ของ A นั่นคือ square matrix จะ full rank ถ้า ทุกคอลัมน์ independent กัน เมื่อ full rank, det จะ = 0 วิธีหา rank อาจหาได้โดย [U, W, V] = svd(A) แล้วดูว่า rank คือ จำนวน residual ของ W ที่ไม่เป็น 0 full rank = singular matrix = หา inverse ได้ สมบัติของ rank 1. rank(AB) min(rank(A), rank(B)) ย้ำว่า wiki Null Matrix เมตริกซ์ศูนย์ (Zero Matrix หรือ Null Matrix ) คือ เมตริกซ์ที่มีสมาชิกทุกตัวเป็นศูนย์หมด Orthogonal Matrix Cramer's rule Ax = b Cramer's rule ใช้ได้เมื่อ A เป็น square matrix เท่านั้น กรณีที่มีจำนวน สมการ มากกว่าจำนวน ตัวแปร ( A mxn เมื่อ m > n ) หรือเราเรียกว่า over parameter เราไม่สามารถหา inverse ของ rectangular matrix ได้ ให้ไปใช้ psudoinverse แทน x = A + b หรือ หรือ หรือ ไปใช้ SVD แก้สมการซะ คำตอบคือ last col of v ! Gaussian elimination method ใช้แก้สมการ เช่นเดียวกับ กฏของ คราเมอร์ วิธีคิดหลักๆ คือ ทำให้สามเหลี่ยมล่างเป็น 0 ให้หมด โดยทำ row operation จา่กนั้น แทนค่ากลับไป Diagon...

cross product matrix

มันก็คือ การหา det ของ matrix =

วิธีใช้ ย่อๆ เกี่ยวกับ Matrix กับ Vector ( มาจาก CASIO-991MS manual )

Matrix เปลี่ยน mode เป็น Matrix กด mode ไปเรื่อยๆ จนเจอ MAT วิธีใส่ Matrix เข้าไป จิ้ม MAT ( ตรงเลข 4 ) DIM -- สร้าง Matrix ใหม่ - เราจะสร้าง Matrix เก็บไว้ในตัวแปรได้สามตัว คือ A, B, C ( Trick : ตอนใส่ค่า a11, a12, .. ถ้าอยากข้ามไปให้กดลูกศร ขึ้น ลง ซ้าย ขวา ได้เลย ) รุ่นนี้ มันใส่ได้มากสุด 3x3 นะ ถ้าใส่ 4 ไป มันจะ dimension error EDIT -- แก้ไข Matrix ที่สร้างไว้แล้ว MAT -- เอา Matrix ออกมาใช้งาน Add : MatA + MatB Subtract : MatA - MatB Multiply with scalar : MatA x 3 หรือ 3 x MatA Multiply : MatA x MatB Det : Det MatA Transpost : Trn MatA Inverse : MatA -1 Absolute Value of Each Element : Abs MatA ผลลัพธ์มันจะได้เป็น MatAns11 ซึ่งเราสามารถกด ซ้าย ขวา ขึ้นลงได้เหมือนเลื่อนดู Element จาก Matrix เลย Vector เปลี่ยน mode เป็น Vector กด mode ไปเรื่อยๆ จนเจอ VCT วิธีใส่ Vector เข้าไป จิ้ม VCT ( ตรงเลข 5 ) DIM -- สร้าง Vector ใหม่ - เราจะสร้าง Vector เก็บไว้ในตัวแปรได้สามตัว คือ A, B, C ( Trick : ตอนใส่ค่า a1, a2, .. ถ้าอยากข้ามไปให้กดลูกศร ซ้าย ขวา ได้เลย ) EDIT -- แก้ไข Vector ที่สร้า...