Why must have brackets around 'student'?

1 vue (au cours des 30 derniers jours)
zhenyu zeng
zhenyu zeng le 23 Mai 2019
Commenté : Jan le 23 Mai 2019
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 commentaire
Jan
Jan le 23 Mai 2019
To be exact: "brackets" are [ and ], while ( and ) are called "parentheses".

Connectez-vous pour commenter.

Réponse acceptée

madhan ravi
madhan ravi le 23 Mai 2019

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by