I have a column vector, x, in which every 150 elements need to be averaged and the result saved, as a new vector, y. So far I have:
for i = x(1:150:length(x)) mean(i)end
But I cannot figure out how to get the mean for the next 150 (151:300) and so on until the end. How should I adjust this code?
Best Answer