Why must have brackets around 'student'?

1 回表示 (過去 30 日間)
zhenyu zeng
zhenyu zeng 2019 年 5 月 23 日
コメント済み: Jan 2019 年 5 月 23 日
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".

サインインしてコメントする。

採用された回答

madhan ravi
madhan ravi 2019 年 5 月 23 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by