Cody

Problem 45373. Hanging cable - 01

Solution 2168544

Submitted on 21 Mar 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Fail
assert(abs(cable_01(100,200,50)-164.7918)<0.0001)

Assertion failed.

2   Fail
assert(abs(cable_01(100,200,90)-198.664)<0.0001)

Assertion failed.

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

Assertion failed.

4   Fail
assert(abs(cable_01(50,80,20)- 45.4046)<0.0001)

Assertion failed.

5   Fail
assert(abs(cable_01(100,120,50)-52.7537)<0.0001)

Assertion failed.

6   Pass
assert(isequal(cable_01(50,80,10),0))

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!