Azzera filtri
Azzera filtri

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?

1 visualizzazione (ultimi 30 giorni)
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?

Risposta accettata

David Hill
David Hill il 8 Giu 2022
a=randi(100,1,50);%an array
n=sum(reshape(a,5,[]));%sum of 5 elements placed in new array

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by