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 270477

Submitted on 1 Jul 2013

Incorrect

20Size
Leading solution size is 7.
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
 
%%
timetorun();
t0 = tic;
pause(1)
t1 = timetorun();
t2 = toc(t0)-(t1+1);
assert(abs(t2)<5e-3)
Error: The ''pause'' command is not supported for this product offering using these arguments: ''n > 2''
2
Fail
 
%%
t0 = tic;
pause(1)
t1 = timetorun();
t2 = toc(t0)-(t1+1);
assert(abs(t2)<5e-3)
Error: The ''pause'' command is not supported for this product offering using these arguments: ''n > 2''
3
Fail
 
%%
t0 = tic;
pause(1)
t1 = timetorun();
t2 = toc(t0)-(t1+1);
assert(abs(t2)<5e-3)
Error: The ''pause'' command is not supported for this product offering using these arguments: ''n > 2''
4
Fail
 
%%
t0 = tic;
pause(1)
t1 = timetorun();
t2 = toc(t0)-(t1+1);
assert(abs(t2)<5e-3)
Error: The ''pause'' command is not supported for this product offering using these arguments: ''n > 2''
5
Fail
 
%%
t0 = tic;
pause(1)
t1 = timetorun();
t2 = toc(t0)-(t1+1);
assert(abs(t2)<5e-3)
Error: The ''pause'' command is not supported for this product offering using these arguments: ''n > 2''