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 (최근 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개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!