I have 32 column matrices of different names to be added separately. Is it possible to write a loop to do it instead of writing Sum1 = sum(VarName2)… and so on for 32 matrices?
I have matrices named VarName2, VarName3, …, VarName33. I tried using the following loop;
for i = 1:32sum(i)= sum(VarName(i));end
and it returned the error "Undefined function or variable 'VarName'". So, needed help with this.
Best Answer