Problem 42855. Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a right angled triangle with sides a and b and hypotenuse c does not exist, return NaN (not-a-number).
Solution Stats
Problem Comments
-
2 Comments
Asif Newaz
on 19 Oct 2019
although i'm providing a correct solution with correct answer, it's showing assertion failed for the 1st case. other assertions are ok. help?
goc3
on 29 Sep 2020
The first test case has had a tolerance applied.
Solution Comments
Show commentsProblem Recent Solvers1637
Suggested Problems
-
Arrange Vector in descending order
10461 Solvers
-
Find the sum of the elements in the "second" diagonal
1133 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
362 Solvers
-
Remove the two elements next to NaN value
642 Solvers
-
Get the elements of diagonal and antidiagonal for any m-by-n matrix
470 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!