I have a program which computes a number, stores it and uses it for many times.
Then it proceeds to the next iteration (it’s a loop), generates another number, stores it and uses it as well for many times.
Considering I have to store a lot of values, i will store them in an array called value_holder
Is it the same thing, computationally, doing:
for i = 1:x
value_holder[i] = function()
stuff that uses: value_holder[i]
end
and:
for i = 1:x
value_name = function()
value_holder[i] = value_name
stuff that uses: value_name
end