Cody

Solution 1595874

Submitted on 30 Jul 2018 by Tim
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
N=2; R=100; V=1; reading_correct = [1 1/2]; reading = LadderVolt(N,R,V); assert(norm(reading-reading_correct)<100*eps) 2

ans = 2

2   Pass
N=4; R=10; V=15; reading_correct = [15 6 3]; reading = LadderVolt(N,R,V); assert(norm(reading-reading_correct)<100*eps) 3

ans = 3

3   Pass
N=6; R=1000; V=130; reading_correct = [130 50 20 10]; reading = LadderVolt(N,R,V); assert(norm(reading-reading_correct)<100*eps) 4

ans = 4

4   Pass
N=8; R=1; V=3.4; reading_correct = [3.4 1.3 0.5 0.2 0.1]; reading = LadderVolt(N,R,V); assert(norm(reading-reading_correct)<100*eps) 5

ans = 5

5   Pass
N=10; R=5000; V=267; reading_correct = [267 102 39 15 6 3]; reading = LadderVolt(N,R,V); assert(norm(reading-reading_correct)<100*eps) 6

ans = 6

6   Pass
N=14; R=3500; V=122; reading_correct = [122 46.6 17.8 6.8 2.6 1.0 0.4 0.2]; reading = LadderVolt(N,R,V); assert(norm(reading-reading_correct)<100*eps)