Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Solution 188310

Submitted on 9 Jan 2013

Incorrect

77Size
Leading solution size is 21.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Fail
 
%%
assert(numCmp('12.3456',12.3456))
Error: You may not use the command(s) eval in your code

	    	
2
Fail
 
%%
assert(numCmp('12.3456',12.3456789))
Error: You may not use the command(s) eval in your code

	    	
3
Fail
 
%%
assert(~numCmp('12.3456',12.345))
Error: You may not use the command(s) eval in your code

	    	
4
Fail
 
%%
assert(~numCmp('12.34567890',12.3456))
Error: You may not use the command(s) eval in your code

	    	
5
Fail
 
%%
assert(numCmp('12e6',12e6))
Error: You may not use the command(s) eval in your code

	    	
6
Fail
 
%%
assert(~numCmp('54',100))
Error: You may not use the command(s) eval in your code