for loop 2x2 matrix, do not overwrite each iteration
Show older comments
for i=1:5
a=[i i+1;i i-1]
end
I'm wanting to save each iteration of a so that I would end up with a 10x2 matrix in the above example.
Thanks
1 Comment
John D'Errico
on 11 Jan 2023
Why not create a 3-d matrix? So now each matrix is just one plane of a 3-d array, of size 2x2x5? Or store each 2x2 array as one cell of a cell array of length 5?
Accepted Answer
More Answers (0)
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!