Reputation: 291
given A number of sensor values measured at each of 100 runs.
A =
8 7 8 9 8 8 8 8 9 8
to display the value of specific runs (let us say every 5 runs)
the code is:
C= B(1:5:end);
C= 8 8
What I want is to store the average of 5 runs how to do that?
answer should be = 8 8.2
Upvotes: 0
Views: 54
Reputation: 28718
I don't have Matlab at hand, but I would try something like mean(reshape(B,5,[]))
.
Upvotes: 1