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

1 view (last 30 days)
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
dpb on 14 May 2021
Edited: dpb on 14 May 2021
Not enough info but
for m=1:12:62*12+1
...
end
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)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!