Cody

Problem 45373. Hanging cable - 01

Solution 3174576

Submitted on 12 Oct 2020
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   Fail
assert(abs(cable_01(50,120)-52.7537)<0.0001)

a = 550.5000 d = 60.1189

Assertion failed.

2   Fail
assert(abs(cable_01(50,200)-164.7918)<0.0001)

a = 3.7505e+03 d = 100.0118

Assertion failed.

3   Fail
assert(isequal(cable_01(50,100),0))

a = 0.5000 d = 6.7203e+42

Assertion failed.

4   Fail
assert(abs(cable_01(80,180)- 60.2058)<0.0001)

a = 850.5000 d = 90.1681

Assertion failed.

5   Fail
assert(abs(cable_01(100,180)-55.9443)<0.0001)

a = -949.5000 d = 90.1348

Assertion failed.

6   Fail
assert(abs(cable_01(100,199)-5.9740)<0.0001)

a = -49.3750 d = 181.9186

Assertion failed.

Suggested Problems

More from this Author149

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!