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?

답변 (1개)

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

이 질문은 마감되었습니다.

질문:

2013년 8월 16일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by