Repeat 3D matrix in 4D
8 ビュー (過去 30 日間)
古いコメントを表示
Mantas Vaitonis
2018 年 7 月 18 日
コメント済み: Mantas Vaitonis
2018 年 7 月 18 日
Hello,
I suppose it is not hard, but I need to repeat 3D matrix a (NxMxL) in to 4D b (NxMxMxL). What I need is to repeat each 2D page of 3D matrix M times (which is columns) in 4D. If try:
b=repmat(a,1,1,1,L) ;
Result is b (NxMxLxL), what would be the correct way to do this?
0 件のコメント
採用された回答
Walter Roberson
2018 年 7 月 18 日
b = repmat( reshape(a, size(a,1), size(a,2), 1, size(a,3)), 1, 1, size(a,2), 1);
その他の回答 (0 件)
参考
カテゴリ
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!