MATLAB: Mean of 72720 rows in one column such that I can take mean of 720 rows separately.

anas

Hello!
I have data of 72720 rows in one coloumn. I want to take the mean of each 720 rows and then plot a graph.
Thank you

Best Answer

Try this:
data = (1:72720)'; % Create Column Vector To Test Code
rdata = reshape(data, [], 720); % Reshape To Matrix
rdata_mean = mean(rdata); % Calculate Column Means
figure
plot(1:numel(rdata_mean), rdata_mean)
grid
Experiment to get the result you want.