Reshape array 3 variables into 2?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I have an array of A=1x100x50.
How can I reshape it in B=100x50?
I have tried with
B=reshape(A,[100, 50]);
But I get the error message
Error using reshape To RESHAPE the number of elements must not change.
Thanks in advance for your reply.
0 件のコメント
採用された回答
Andrei Bobrov
2018 年 1 月 30 日
編集済み: Andrei Bobrov
2018 年 1 月 30 日
B = squeeze(A)
or
B = permute(A,[2,3,1]);
or
B = reshape(A,size(A,2),[]);
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!