month2 = 12;
day2 = 31;
year2 = 1997;
year3 = 2016;
for t = year2+1:1:year3-1
if mod(t,400) == 0
    leap_day2 = 1;
elseif mod(t,100) == 0
    leap_day2 = 0;
elseif mod(t,4) == 0
    leap_day2 = 1;
else
    leap_day2 = 0;
end
leap_day2;


day_of_year2 = day2;
for iiii = 1:month2-1
    switch (iiii)
        case {1,3,5,7,8,10,12}
            day_of_year2 = day_of_year2 + 31;
        case {4,6,9,11}
            day_of_year2 = day_of_year2 + 30;
        case {2}
            day_of_year2 = day_of_year2 + 28 + leap_day2;
    end
    day_of_year2;
end
h = [day_of_year2];

end

여기서 h 값의 전체 합을 구하고 싶습니다.