3d to 2d matrix
2 ビュー (過去 30 日間)
古いコメントを表示
I need to convert this "u" 3d matrix in a 2d numerical matrix, without having to cut and paste number by number in a new one, just like the "u2" example.
Thank you for any help!
0 件のコメント
採用された回答
Joseph Cheng
2021 年 6 月 22 日
take a look at the function squeeze()
for ind = 1:3
val(1,1,ind)=-ind;
end
disp(val)
u2 = squeeze(val);
disp(u2)
2 件のコメント
Joseph Cheng
2021 年 6 月 22 日
if the starting matrix is a bit more complicated you can also use reshape() as well
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!