My code produces a variable 'grains' which is a 1x3001 double.
I want to sum together the numbers in the first 10 cells, and repeat this in blocks of 10 cells until the end and save these in a new variable.
Please could somebody provide me with a starting point?
2 Comments
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/723148-sum-contents-of-array-in-groups-of-10#comment_1276723
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/723148-sum-contents-of-array-in-groups-of-10#comment_1276723
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/723148-sum-contents-of-array-in-groups-of-10#comment_1276733
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/723148-sum-contents-of-array-in-groups-of-10#comment_1276733
Sign in to comment.