Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Increasing 3D Matrix
- % Creates a 3D Matrix with increasing values
- A = zeros(2,3,4);
- number = 1;
- for page = 1:4 % pages in the matrix
- for column = 1:3; % columns in the matrix
- for row = 1:2; % rows in the matrix
- A(row,column,page) = number;
- number = number + 1;
- end
- end
- end
- display(A)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement