开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜