extractmonths function

Extracts the rows of a matrix corresponding to requested months of a year given the date (origin) of the first row