Hi I have a 4×365 matrix.
I'd like to know the average of the numbers in each column, so that's 365 values I'm looking for.
I can't use the mean() or sum() commands, and I'm trying to get this done using for loop.
X=ones(4,365)cols=size(X,2);for i=1:4 for j=1:cols sum = sum + X(i,j); endend
this gives me the final iteration. I need each iteration outputted into a new matrix so I may take the average.
Best Answer