Hi all,
I have randomly generated matrix and I want to go through all columns and to sum every i-th column separately. I don't want to sum all the columns but to sum depending on the counter in for loop for example:
[a,b] = size(C); for i = 1:b S = sum(C(:,i)) S = 0 %but this doesn't work, result is sum of elements of all columns
Best Answer