Cody

Solution 1121505

Submitted on 12 Feb 2017 by Jihye Sofia Seo
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
v = 20; s=2; d = 20; assert(isequal(distance(s,v),d));

g = 10 ttop = 2 h = 20 maxH = 20 maxT = 4 d = 20

2   Pass
v = 20; s=2.5; d = 21.25; assert(isequal(distance(s,v),d));

g = 10 ttop = 2 h = 18.7500 maxH = 20 maxT = 4 d = 21.2500

3   Pass
v = 20; s=12.5; d=40; assert(isequal(distance(s,v),d));

g = 10 ttop = 2 h = -531.2500 maxH = 20 maxT = 4 d = 40

4   Pass
v=50; s=10; d=250; v=5; s=5; d=2.5; assert(isequal(distance(s,v),d));

g = 10 ttop = 0.5000 h = -100 maxH = 1.2500 maxT = 1 d = 2.5000

Suggested Problems

More from this Author2