Given two sides of a triangle, find the minimum and maximum possible area of the triangle.
the length of the third side has to be of integer-valued.
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers19
Suggested Problems
-
Matrix indexing with two vectors of indices
776 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
885 Solvers
-
374 Solvers
-
Sum of first n positive integers
622 Solvers
-
Find out value of sine given by degree.
356 Solvers
More from this Author174
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Asif,
The results in the test suite seem to be based on the idea that the minimum and maximum areas are found by setting the third side to a3 = abs(a1-a2)+1 and a3=a1+a2-1, which is not correct. The correct maximum is somewhere in the middle. For example, in problem 2, the correct results are mn = 24.9987 and mx = 1250.0000.
yes.. i see that now.. my assumption was wrong.
Sorry for the misconception.
yet again we learn from our mistakes
Humm, I am certain that the minimum area of any triangle is zero, which corresponds to the degenerate case when one side is equal to the sum of the other two.