3D Array Rastering
Afficher commentaires plus anciens
I am attempting to raster scan DMD mirrors by inputing a 3D array. I would like the array (for the number of mirrors along one side, n = 2) to look like: [[1,0;0,0],[0,1;0,0],[0,0;1,0],[0,0;0,1]] (i.e. a row major order scan of the mirrors). I intend to scale this array and my initial attempt hasn't been succesful. How do I create this array?
N = 4;
Array3D = zeros(2,2,N);
for row=1:2
for col=1:2
for k=1:N
Array3D(row,col,k) = 1;
end
end
end
1 commentaire
darova
le 29 Mai 2020
What about eye?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Environment and Settings 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!