Sum per 2 elements in vector
이전 댓글 표시
Hello,
I am trying to sum my vector by 2 elements.
An example:
I have:
A= [1;2;3;4;5;6]
What I want:
A_new = [3;7;11]
Is there any way to easily code this?
I know one way via a for-loop but I was wondering if there was a more efficient way.
Thanks in advance!
채택된 답변
추가 답변 (1개)
Abdel
2023년 9월 18일
0 개 추천
The sum of the last two elements in
(call the result ans6)
카테고리
도움말 센터 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!