Create loop to extract mean of every 100 values
3 views (last 30 days)
Show older comments
Hi,
I have an array, 24000 X 31.
Is there a way of writing a for loop that can take every row of the array to create 31 rows each with 24000 values and then take the mean average of every 100 values in each row. The result should hopefully be 31 separate arrays each with 240 values.
Thanks in advance, Ed.
0 Comments
Answers (1)
David Hill
on 3 Feb 2022
newMatrix=reshape(mean(reshape(yourMatrix,100,[])),240,[]);%columns are each array
0 Comments
See Also
Categories
Find more on Multidimensional Arrays 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!