Why must have brackets around 'student'?

1 Ansicht (letzte 30 Tage)
zhenyu zeng
zhenyu zeng am 23 Mai 2019
Kommentiert: Jan am 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 Kommentar
Jan
Jan am 23 Mai 2019
To be exact: "brackets" are [ and ], while ( and ) are called "parentheses".

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

madhan ravi
madhan ravi am 23 Mai 2019

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by