Reshaping 2x52 array into 1 special row
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
I am wondering how I can reshape an array into the format that I need.
I currently have an array structured as:
A B
C D
E F
G H
etc.
However I need it to be structured as:
A B C D E F G H
I'm unfamiliar with matlab and have little idea how to go about this. I thought reshape() may do the trick but I think that will just transpose columns and append one column after the other.
Any help is appreciated!
0 件のコメント
回答 (1 件)
Stephan
2019 年 3 月 29 日
A = [1 2; 3 4; 5 6; 7 8]
B = reshape(A',1,[])
gives:
A =
1 2
3 4
5 6
7 8
B =
1 2 3 4 5 6 7 8
0 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!