Matlab arrays operation
How to change an array of columns to an arra开发者_Go百科y of rows?
a=[1 ; 2 ;3]
then
a=[1 2 3]
Transpose.
>>a=[1;2;3]
>>a.'
>>ans =
1 2 3
Edit: according to the documentation ...
X' is the complex conjugate transpose of X.
X.' is the non-conjugate transpose.
The operation you want is called a matrix transposition. The result is a matrix that turns all rows into columns and vice-versa. If your matrix is A, then the transposed result is acquired in B by:
B = A.'
Matlab has many matrix routines. Use transpose
operation.
精彩评论