Hi. I need some help with the problem below.
for k = 1:1:n; sum = k^2+2k; % Just an example
end
At the end of the run, I wish to have a total of n variables named, say, array_1, array_2, … array_n. Each array should contain the value of the sum associated with the respective k. So, array_1 = 3, array 2 = 8, and so on.
I am having trouble renaming the variable. Any help?
Best Answer