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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Rajeev Kumar
am 8 Jun. 2022
Beantwortet: David Hill
am 8 Jun. 2022
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 Kommentare
Akzeptierte Antwort
David Hill
am 8 Jun. 2022
a=randi(100,1,50);%an array
n=sum(reshape(a,5,[]));%sum of 5 elements placed in new array
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!