Why must have brackets around 'student'?

6 visualizzazioni (ultimi 30 giorni)
zhenyu zeng
zhenyu zeng il 23 Mag 2019
Commentato: Jan il 23 Mag 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 Commento
Jan
Jan il 23 Mag 2019
To be exact: "brackets" are [ and ], while ( and ) are called "parentheses".

Accedi per commentare.

Risposta accettata

madhan ravi
madhan ravi il 23 Mag 2019

Più risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by