for loop for a pair of months over a year

3 views (last 30 days)
PureFleet on 2 Dec 2021
Commented: Rik on 2 Dec 2021
I want to make 2 for loops where I have the months in a year paired together
i.e plotindex1 jan + feb, may + june, september + october
plotindex2 march + april, july + august, november + december
how would i do it so in plotindex1 the months selected would be represented as 1 and the rest as 0 and vice versa for plotindex2
  1 Comment
Rik on 2 Dec 2021
You can find guidelines for posting homework on this forum here. If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks). If your main issue is with understanding the underlying concept, you may consider re-reading the material you teacher provided and ask them for further clarification.

Sign in to comment.

Answers (0)


Find more on Data Distribution Plots 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!

Translated by