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

8 Comments
This problem has been polished and additional test cases were added.
I believe all of the test solutions of this problem are wrong
I believe that this problem is fixed now.
I think there might still be some issues with the test suite, Grant. Currently, only test suites 1 and 3 have sum(arcsind(y_correct))=180 within a degree. For test suite 3, you need to take 180arcsind(y_correct(3)) to get the sum to equal 180, but the sines of those two angles are still the same.
Please let me know if I am missing something  If you take the arcsin for the current answers for problem 2 (y_correct = [0.7174 0.7174 0.8608]), you get angles in degrees of [49.84 49.84 59.41], which does not add up to 180 degrees. If you take 18059.41 to keep the sine of angle #3 consistent, you end up with a sum greater than 180 degrees. Since this example is two 345 right triangles joined together at the 4side (since height=4 and Area=12), I think the answer for case 2 should be [0.8 0.8 0.96].
Yes, the test solutions are incorrect. If the height of the triangle is h, and if the sides are s, then the sine of the angle at the base is h/s. The test solutions have all calculated this as sin(h/s).
@William, Great catch! Thanks a lot. :)
Don't waste your time on this one, the tests are all wrong. All posted solutions use if/else or won't work (they might have worked once, before the tests were changed). I've tried using the sine definition, the opposite height, law of sines, etc (all of them agree at a solution that's different from the test cases). And if the tests aren't wrong, then the problem description needs to be fixed...
I apologize for not seeing this sooner. The problem has been fixed, again. Let me know if something is still wrong.
Solution Comments

1 Comment
Shortest REAL solution so far. All the shorter ones use som form of cheating!
Problem Recent Solvers41
Suggested Problems

Determine whether a vector is monotonically increasing
16625 Solvers

Find third Side of a right triangle given hypotenuse and a side. No *  or other functions allowed
168 Solvers

Create an nbyn null matrix and fill with ones certain positions
476 Solvers

Sums of cubes and squares of sums
198 Solvers

4467 Solvers
More from this Author37
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!