How to write multiple rows in a multiple column way without changing the order

 采纳的回答

result = reshape(A.',1,numel(A));

2 个评论

Thnaks. I understand the row to column and numel operation. What is 1 for ? Number of rows ?
Yes, the 1 is the number of rows, and numel(A) is the number of columns. The initial transpose is to get the row elements of the original A to be next to each other in memory so they will appear next to each other after the reshape.

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by