Iseven/Isodd

Version 1.0.0.0 (1.65 KB) by Dan K
Simple helper files that return true/false based on whether inputs are even or odd, respectively
721 Downloads
Updated 16 Feb 2012

View License

% 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 (2024). Iseven/Isodd (https://www.mathworks.com/matlabcentral/fileexchange/35105-iseven-isodd), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Genomics and Next Generation Sequencing in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0