Code covered by the BSD License  

Highlights from
mydate

mydate

by

 

16 Apr 2011 (Updated )

Augments MATLAB's date/time library for improved handling of epochs and formats commonly used in GPS

mydatestd (epoch)
function [epoch_std, year] = mydatestd (epoch)
%MYDATESTD: Convert epoch to standardized annual format.
% (useful for building monthly climatologies).
    temp = mydatevec(epoch);
    year = temp(:,1);
    [year_len, year_start] = mydatestd_aux(year);

    std_year_len = mydatestd_aux();

    epoch_std = (epoch - year_start) ./ year_len .* std_year_len;
end

%!test
%! % mydatestd()
%! test('mydatestd_aux')

Contact us