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

Solution 172468

Submitted on 4 Dec 2012 by @bmtran

Correct

39Size
Leading solution size is 22.
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
Pass
 
%%
str='pause(1)';
ss=14;
assert(abs(ss-score(str))<3)

                    
2
Pass
 
%%
str='pause(1/2);pause(1/2)';
ss=22;
assert(abs(ss-score(str))<3)

                    
3
Pass
 
%%
str='pause(1/200);pause(1/200)';
ss=12;
assert(abs(ss-score(str))<3)

                    
4
Pass
 
%%
str='pause((1/200));pause((1/2))';
ss=19;
assert(abs(ss-score(str))<3)