for i=1:20Data = sprintf('Data%i',i);DataNew(:,i) = mean(Data);end
I have 20 Data arrays labeled Data1-Data20 and want to cycle through them in a for loop and do some calcs like mean, or run them all through a formula. But I keep getting errors that the Data is a char, how do I do this correctly?
Best Answer