function avg=avgscore(testscores,student,first,last)
for k=first:last
scores(k)=testscores.(student).week(k);
end
avg=sum(scores)/(last-first+1)
Why must have brackets around 'student'?

댓글 수: 1

Jan
Jan 2019년 5월 23일
To be exact: "brackets" are [ and ], while ( and ) are called "parentheses".

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

제품

릴리스

R2018b

질문:

2019년 5월 23일

댓글:

Jan
2019년 5월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by