Monday, July 20, 2015

isleapyear function matab

Is it a leapyear?
isleapyear = @(yr) (datenum(yr+1,1,1)-datenum(yr,1,1))==366;
isleapyear(1900)

No comments: