How to write the program for pick the first five element from an array than next five and store their individual sum in new array?
2 次查看(过去 30 天)
显示 更早的评论
How to write the program for pick the first five element from an array than next five and store their individual sum in new array?
0 个评论
采纳的回答
David Hill
2022-6-8
a=randi(100,1,50);%an array
n=sum(reshape(a,5,[]));%sum of 5 elements placed in new array
0 个评论
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!