Hello;
h have a matrix with size 66x100 how i change it's size to 1x6600
thanks

 采纳的回答

José-Luis
José-Luis 2016-9-27
编辑:José-Luis 2016-9-27
bla = rand(66,100);
bla = bla(:)';
Please read the documentation on reshape

更多回答(1 个)

KSSV
KSSV 2016-9-27
编辑:KSSV 2016-9-27
A = rand(66,100) ;
A = A(:) ; % joins column by column
% if you want row by row
A = rand(66,100) ;
A = A' ;
A = A(:) ;

2 个评论

That would give column vector and not a row vector.
Transposing it gives a column vector.

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by