True for integers(whole numbers).


Updated 12 Mar 2007

No License

ISWHOLE True for integers(whole numbers).

ISWHOLE(X) is 1 for the elements of X that are integers, 0 otherwise. ISWHOLE(X1,X2,..,XN) returns a 1-by-N array with 1 for integers and 0 otherwise.

ISWHOLE does not check for integer data type as does ISINTEGER.

Cite As

Mukhtar Ullah (2023). ISWHOLE (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Numeric Types in Help Center and MATLAB Answers

Inspired: Date Odometer class

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

Modified, as suggested by Josef Lotz, to provide indices of integer elements.