Cody

Problem 47108. Get the side length by using the law of cosines.

Solution 3447298

Submitted on 28 Oct 2020 by Alex
  • Size: 28
  • This is the leading solution.
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
a = 1; b = 5; gamma = 45; y_correct = 4.350739269151224; assert(isequal(law_cos(a, b, gamma),y_correct))

2   Pass
a = 3; b = 4; gamma = 90; y_correct = 5; assert(isequal(law_cos(a, b, gamma),y_correct))

Suggested Problems

More from this Author2

Community Treasure Hunt

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

Start Hunting!