Cody

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

Solution 3812833

Submitted on 24 Nov 2020 by Dyuman Joshi
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!