MATLAB Answers

Writing a loop that goes 12 months at a time for 62 years

2 views (last 30 days)
Brecken Mabry Chin
Brecken Mabry Chin on 14 May 2021
Edited: dpb on 14 May 2021
I need help on how to write a loop that would go 12 months at a time for 62 years and sum the difference between the max and min of a function.
  1 Comment
dpb on 14 May 2021
Not enough info but
for m=1:12:62*12+1
would cover the span in months.
But, look into rowfun and grouping variables and you may well do without explicit looping entirely...

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!