If a string is able to be entirely converted to an integer, return a "true" flag. Otherwise, return a false flag. For example:
a = '32';
isconvertible(a)
Would return logical(1)
a = '32f';
isconvertible(a)
Would return logical(0)
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers23
Suggested Problems
-
Extract leading non-zero digit
2246 Solvers
-
1626 Solvers
-
396 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
399 Solvers
-
Find the index of n in magic(n)
273 Solvers
More from this Author3
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
The letter i is technically a complex number. So it should return true.
Rafael, the question askes for an integer specifically and not a number (let alone a complex number).
The test suite has been separated into individual test cases.