Code covered by the BSD License  

Highlights from
General Extra Toolbox

General Extra Toolbox

by

 

11 Feb 2002 (Updated )

Generic functions for matrix manipulation, image processing, etc.

isodd(X)
function Y = isodd(X)
%
% ISODD     True for odd numbers
%
%    Y = ISODD(X) returns true (1) is X is odd, false (0) if X is even.
%    If X is not an integer will return 0.
%

X = X+1;
Y = logical( 2*floor(X/2)==X );

Contact us