Flag a convertible string - MATLAB Cody - MATLAB Central

Problem 45985. Flag a convertible string

Difficulty:Rate
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

39.29% Correct | 60.71% Incorrect
Last Solution submitted on May 12, 2025

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
2
3

Problem Recent Solvers21

Suggested Problems

More from this Author3

Community Treasure Hunt

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

Start Hunting!