How can I sum arrays internally to get a new array using a loop.
2 views (last 30 days)
Show older comments
So i have an array of 1x5000+ numbers. It is formed in a way so every 288 numbers is one day. I need to shorten my array so that it adds up 288 numbers and loops until in the end i have an array of only days. right now the numbers are in 5 min intervals. And these are in cells that was transfered from an excel file so I need it to be able to work with that.
0 Comments
Accepted Answer
Matt J
on 27 Apr 2022
Edited: Matt J
on 27 Apr 2022
yourVector=rand(1,288*50);
days=sum(reshape(yourVector,288,[]));
whos yourVector days
3 Comments
More Answers (0)
See Also
Categories
Find more on Logical 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!