MATLAB: Help needed!!!The function accepts two years and returns the number of days within that interval

function

 The function days_between_years accepts two years and returns the number of days within that interval inclusive.

Best Answer

function days = days_between_years( firstYear, lastYear )
days = 0;
for i=firstYear:lastYear
for j=1:12
days = days+days_in_a_month(j,i);
end
end
end