After each iteration of my for loop, a matrix is produced. I want to name that matrix based on the number of the iteration. This is what I have so far:
for trials = 1:max_trials a = int2str(trials); a = output_matrix;
However, Matlab just stores the last matrix produced under the variable 'a'. How can I get it to store each matrix under its respective iteration? For example, if max_trials = 3, how would I get three separate matrices labelled '1', '2' and '3'?
Thank you!
Best Answer