How to make a 3D Matrix
이전 댓글 표시
How to make a 3D Matrix that contains all ones in the first layer, all twos in the second layer and all threes in the third layer?
댓글 수: 5
Fangjun Jiang
2020년 9월 3일
define layer
David Hill
2020년 9월 3일
Do you mean something like:
f(1:5,1:5,1)=1;
f(1:5,1:5,2)=2;
f(1:5,1:5,3)=3;
Nicholas Deosaran
2020년 9월 3일
Abdolkarim Mohammadi
2020년 9월 3일
Size = [5,6,3];
M = ones(Size) .* permute([1;2;3],[3,2,1]);
Nicholas Deosaran
2020년 9월 3일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!