Info

This question is closed. Reopen it to edit or answer.

Make multiple variables and use them instantly

1 view (last 30 days)
Kimmo
Kimmo on 4 Sep 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
Hey,
I would like to have code which make n matrix and fill them instantly. Below is explain:
for i=1:n
Create matrix i (Matrix_i)
for
Some code which fill Matrix_i
end
end
And finally I have n pieces of filled matrix_name. How could I do this?
Thank you!

Answers (1)

Image Analyst
Image Analyst on 4 Sep 2014
Edited: Image Analyst on 4 Sep 2014
You can stuff the 2D matrices created at each iteration into a 3D matrix. That would be preferable to having n separate 2D matrices.

Tags

Community Treasure Hunt

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

Start Hunting!