How to make a 3D Matrix
Afficher commentaires plus anciens
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 commentaires
Fangjun Jiang
le 3 Sep 2020
define layer
David Hill
le 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
le 3 Sep 2020
Abdolkarim Mohammadi
le 3 Sep 2020
Size = [5,6,3];
M = ones(Size) .* permute([1;2;3],[3,2,1]);
Nicholas Deosaran
le 3 Sep 2020
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!