How to save different matrices in a loop and then using them in another loop of the same program?

I have to save around 30 different matrices in one loop as A(1), A(2), A(3)....etc, which will be used in another loop for further calculations. Can someone please suggest me some solution with a simple example?

Answers (1)

A = cell(30,1);
for jj = 1:30 % create your matrices
A{jj} = randi(20,randi(5),randi([2 5])); %
end

This question is closed.

Asked:

on 16 Aug 2013

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!