matrix reshaping

1 次查看(过去 30 天)
athpapa -
athpapa - 2011-11-17
Does someone know how to reshape an array for example: A=[1 5; 2 4; 5 6] to an array B=(1,6) to be like this: B=[1 5 2 4 5 6];
Thank you...

采纳的回答

bym
bym 2011-11-17
reshape(A',1,[])

更多回答(2 个)

Honglei Chen
Honglei Chen 2011-11-17
You can try
B = A.';
B = B(:).';

athpapa -
athpapa - 2011-11-17
thank you very much!

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by