Forum Numerical Method Linear Algebra
Matrix Transpose and Left Multiplication
-
kevinsunParticipant 2010-05-24 at 3:23 am
1. How can I do a Matrix Transpose? B=A’ 2. How can I do a Matrix Left Multiplication? B=v * A
Thanks.
-
Haksun LiModerator 2010-05-25 at 4:02 pm
To do transpose, you can do
<br /> Matrix B = A.t();<br />Is B a matrix or a vector?
If B is a matrix, you can cast vector v into a matrix and then do the matrix multiplication. That is,
<br /> Matrix B = (new Matrix(v)).t().times(A);<br />If B is a vector, you can do
<br /> Vector B = new Vector((new Matrix(v)).t().times(A));<br />