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 Solvers24
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
53382 Solvers
-
Sum all integers from 1 to 2^n
17885 Solvers
-
Create a vector whose elements depend on the previous element
801 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1275 Solvers
-
487 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.