Cody

Solution 2291438

Submitted on 18 May 2020
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
assert(numCmp('12.3456',12.3456))

2   Pass
assert(numCmp('12.3456',12.3456789))

3   Fail
assert(~numCmp('12.3456',12.345))

Assertion failed.

4   Fail
assert(~numCmp('12.34567890',12.3456))

Assertion failed.

5   Pass
assert(numCmp('12e6',12e6))

6   Fail
assert(~numCmp('54',100))

Matrix dimensions must agree. Error in numCmp (line 2) if dec2bin(str2double(n1)) == dec2bin(n2) Error in Test6 (line 1) assert(~numCmp('54',100))