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 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Rajeev Kumar
le 8 Juin 2022
Réponse apportée : David Hill
le 8 Juin 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 commentaires
Réponse acceptée
David Hill
le 8 Juin 2022
a=randi(100,1,50);%an array
n=sum(reshape(a,5,[]));%sum of 5 elements placed in new array
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrices and Arrays dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!