How to make a 3D Matrix
Ältere Kommentare anzeigen
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 Kommentare
Fangjun Jiang
am 3 Sep. 2020
define layer
David Hill
am 3 Sep. 2020
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
am 3 Sep. 2020
Abdolkarim Mohammadi
am 3 Sep. 2020
Size = [5,6,3];
M = ones(Size) .* permute([1;2;3],[3,2,1]);
Nicholas Deosaran
am 3 Sep. 2020
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!