Why must have brackets around 'student'?

1 view (last 30 days)
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 Comment
Jan
Jan on 23 May 2019
To be exact: "brackets" are [ and ], while ( and ) are called "parentheses".

Sign in to comment.

Accepted Answer

madhan ravi
madhan ravi on 23 May 2019

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!