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

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
madhan ravi 2019년 9월 2일

0 개 추천

Google search "for loop sum MATLAB"

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2019년 9월 2일

댓글:

2019년 9월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by