I'm trying to make a for-loop
in matlab
that would return the following:
C_1 = 0
C_2 = 0
C_3 = 0
C_4 = 0
C_5 = 0
But, before that, I want also a value as follows: C_0 = 0
.
I gave it a try as follows but didn't work:
function test
C{0} = 0;
for i=1:5
C{i} = 0
end
end
How can I solve this issue?
Thanks.