Matlab script to add the values of elements
이전 댓글 표시
I need to do the following :
Given the vector x=[1 8 3 9 0 1],create a MATLAB script to add the values of the elements. Check your final result with the MATLAB ‘sum’ command. (Hint: use MATLAB ‘For’ loop).
I think it can be simple, but i don't understand the questing. Can someone help me ?
thanks
댓글 수: 1
Walter Roberson
2019년 9월 2일
You have to calculate the total of the elements in x -- the value 1+8+3+9+0+1 . You need to use a for loop to do that.
답변 (1개)
madhan ravi
2019년 9월 2일
0 개 추천
Google search "for loop sum MATLAB"
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!