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?

採用された回答

David Hill
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 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by