Iseven/Isodd

Simple helper files that return true/false based on whether inputs are even or odd, respectively

You are now following this Submission

% iseven - Returns true if the input is an even whole number
% Syntax: tf = iseven(x)
% x - numeric (real) input of any number of dimensions and sizes
% tf - true for each element that is an even whole number
% Example
% tf = iseven([1,3,4]);
%
% See also: isodd

% isodd - Returns true if the input is an odd integer
% Syntax: tf = isodd(x)
% x - numeric (real) input of any number of dimensions and sizes
% tf - true for each element that is an odd integer
% Example
% tf = isodd([1,3,4]);
%
% See also: iseven

Cite As

Dan K (2026). Iseven/Isodd (https://www.mathworks.com/matlabcentral/fileexchange/35105-iseven-isodd), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Genomics and Next Generation Sequencing in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0