How to perform a 'chunked average', similar to a rolling average?
Show older comments
Hi, I don't know what the right terminology is, but I'd like to know if there is a nice vectorized syntax for calculating a 'chunked' average/max/etc over a vector. Basically for any given average/max/etc type function, I'd like to do something like this:
for chunk = 1:num_chunks
chunked_max(chunk) = average(input(chunk_start_index(chunk):chunk_end_index(chunk)));
end
Thanks for your thoughts!
Accepted Answer
More Answers (0)
Categories
Find more on Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!