function matlab_time = decimal_year2_matlab_time (dec_year)

time = zeros(length(dec_year),1);
matlab_time = zeros(length(dec_year),1);
for yy=1:length(dec_year)

    year = floor(dec_year(yy,1));
    dec = dec_year(yy,1) - year;
    v = isleapyear(year);
    if v==1
        day = int32(dec*366);
    else
        day = int32(dec*365);
    end
    time(yy) = datenum([year 0 0 0 0 0]);
    matlab_time(yy) = time(yy) + day;
end

end
    