Cody

Problem 45985. Flag a convertible string

Solution 3269913

Submitted on 18 Oct 2020 by David Hill
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = '32'; y_correct = true; assert(isequal(isconvertible(x),y_correct)) x = '-1'; y_correct = true; assert(isequal(isconvertible(x),y_correct)) x = '0'; y_correct = true; assert(isequal(isconvertible(x),y_correct)) x = 'i'; y_correct = false; assert(isequal(isconvertible(x),y_correct)) x = 'shoosan3'; y_correct = false; assert(isequal(isconvertible(x),y_correct)) x = '-2'; y_correct = true; assert(isequal(isconvertible(x),y_correct)) x = 'sdaf'; y_correct = false; assert(isequal(isconvertible(x),y_correct)) x = 'f00'; y_correct = false; assert(isequal(isconvertible(x),y_correct))

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!