开发者

Matlab arrays operation

开发者 https://www.devze.com 2023-03-01 16:07 出处:网络
How to change an array of columns to an arra开发者_Go百科y of rows? a=[1 ; 2 ;3] then a=[1 2 3] Transpose.

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

精彩评论

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