File Exchange

image thumbnail


version (1.21 KB) by Ben Barrowes
Similar to isletter for numbers.


Updated 24 Jun 2005

View License

Similar to isletter. Returns a vector the same length as the input string but with a true for each character that is a number and false otherwise.

The test here is for the ascii character set, so char(48:57) qualifies.

Cite As

Ben Barrowes (2020). isnumber (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

urs (us) schwarz

while a nice pedestriletto, it should be baptized ISDIGIT rather than ISNUMBER. ISNUMBER (traditionally) recognizes string elements that constitute a valid sscanf-able sequence, eg, 1.2e3
as usual, just a thought

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux