필터 지우기
필터 지우기

i have a matrix like:A=[9 7 8 4 2 5 1 8 6 12]. i wanna add the first 5 elements .how can I do this?

조회 수: 1 (최근 30일)
i have a matrix like:A=[9 7 8 4 2 5 1 8 6 12]. i wanna add the first 5 elements .how can I do this?

채택된 답변

Image Analyst
Image Analyst 2016년 4월 23일
Try this:
sumFirst5 = sum(A(1:5));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by