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 186819

Submitted on 6 Jan 2013 by Mehmet OZC

Correct

18Size
Leading solution size is 16.
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
 
%%
x=1;
m=4;
n=1;
leaking_correct = 2;
assert(abs(leaking(x,m,n)-leaking_correct)<1000*eps)

                    
2
Pass
 
%%
x=1;
m=2;
n=50;
leaking_correct = 0.2;
assert(abs(leaking(x,m,n)-leaking_correct)<1000*eps)

                    
3
Pass
 
%%
x=0.2;
m=50;
n=2;
leaking_correct = 1;
assert(abs(leaking(x,m,n)-leaking_correct)<1000*eps)