function [leap] = isleap(year)
% returns 1 if year is a leap year and zero otherwise
% input:
%        year, an integer, the year (e.g. 2010)
% output:
%        leap, a logical value
leap = ((year-4*floor(year/4))==0) && ((year-100*floor(year/100))~=0) || ((year-400*floor(year/400))==0);
return





