I am supposed to combine all the matrix into one, which concatenate horizontally by
matrix = [matrix1 matrix2 matrix3];
now i have to find the mean of the matrix which is 32 x 2039 dimensions.
i tried looping through each row and using mean for the whole elements in that row multipled and divided by the number of elements which is 2039.
answer i get is -Inf, all the time.
help would be appreciated. thanks
my code what i could remember in case
[r, c] = size(matrix);
for i = 1:r
rowvalues = matrix(i,[1:c]);
mean(i,1) = mean2(rowvalues); %or mean(rowvalues,2);
end
results in -Inf.
my aim is to calculate the mean of the matrix which should be 39 X 1 dimensions. thanks