I am trying to create a multidimensional array with nested FOR loop.The problem iam facing is calling the pages after each iteration. Because i have to do use certain condition on each page.
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
clc;
clear all;
A=zeros(2,2,14);
for z =1:14
for y =1:2
for x = 1:2
A(x,y,z) =x+y+z;
end
end
end
% Need each page of A matrix
3 Kommentare
Jan
am 5 Aug. 2018
@Ravi: Today I've formatted your code. Please use the "{} Code" button by your own. Thanks.
Antworten (1)
Jan
am 5 Aug. 2018
Do you mean:
A(:, :, 1)
? "calling the pages after each iteration" is not clear.
1 Kommentar
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!