Find the sines of an isosceles triangle when given its area and height.
For example, when A=60 and h=5, the result is [0.3752 0.3752 0.6927].
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 180-arcsind(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 180-59.41 to keep the sine of angle #3 consistent, you end up with a sum greater than 180 degrees. Since this example is two 3-4-5 right triangles joined together at the 4-side (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. :)
Prime factor digits
The Hitchhiker's Guide to MATLAB
Numbers with prime factors 2, 3 and 5.
Create a vector whose elements depend on the previous element
Find the volume of cone
Find cosine between two given vectors u and v.
Create a square matrix with given conditions
For given xx,x, y vectors build spline of x and y and find yy values for xx vector.
Calculate the values of a polynomial.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office