function isint = isinteger(x)
%  returns 1 if x is an integer, 0 otherwise
%  Written by M. Overton (overton@cs.nyu.edu), last revised March 2003
if size(x) == [1,1] & imag(x) == 0 & floor(x) == x & ceil(x) == x
   isint = 1;
else
   isint = 0;
end
