Cody

Problem 43601. Find the sines of an isosceles triangle when given its area and height

Solution 3750658

Submitted on 20 Nov 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
A = 12; h = 4; y_correct = [0.8, 0.8, 0.96]; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

y = 5 5 6

Assertion failed.

2   Fail
A = 48; h = 8; y_correct = [0.8, 0.8, 0.96]; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

y = 10 10 12

Assertion failed.

3   Fail
A = 40; h = 10; y_correct = [0.9285, 0.9285, 0.6897]; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

y = 10.7703 10.7703 8.0000

Assertion failed.

4   Fail
A = 11; h = 7; y_correct = [0.9757, 0.9757, 0.4274]; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

y = 7.1742 7.1742 3.1429

Assertion failed.

5   Fail
A = 10; h = 7; y_correct = [0.9798, 0.9798, 0.3918]; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

y = 7.1443 7.1443 2.8571

Assertion failed.

6   Fail
A = 100; h = 90; y_correct = [0.9999, 0.9999, 0.0247]; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

y = 90.0069 90.0069 2.2222

Assertion failed.

Community Treasure Hunt

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

Start Hunting!