isOdd(x)
Version 1.1.0.0 (375 Bytes) by
David Coventry
Simple function to determine if a number is odd or even
isOdd determines if a number is odd or even.
isOdd takes an array of numbers, and returns a logical array of the same
size as the input, where true (1) is odd, and false (0) is even.
tf = isOdd(5)
tf =
1
tf = isOdd([1 2 3])
tf =
1 0 1
Created by David Coventry, 7/26/2017
Cite As
David Coventry (2026). isOdd(x) (https://www.mathworks.com/matlabcentral/fileexchange/63890-isodd-x), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R10
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Data Type Identification in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
