How can I write a small loop to create many similar matrices with different names like mat1, mat2, mat3, etc?
I have to declare and fill many matrices but should not do it one by one.
Is there a "do" loop structure that can be used?
Thank you
Code requires creating many matrices
Re: Code requires creating many matrices
The best way to handle that is almost certainly to use a VECT[RECT] structure, likejesusgonzalez wrote:How can I write a small loop to create many similar matrices with different names like mat1, mat2, mat3, etc?
I have to declare and fill many matrices but should not do it one by one.
Is there a "do" loop structure that can be used?
Thank you
dec vect[rect] mat(100)
which will create 100 matrices which you would references as mat(1), ..., mat(100).