Cody

Problem 45338. Area-04

Solution 2138101

Submitted on 23 Feb 2020 by Binbin Qi
  • Size: 22
  • This is the leading solution.
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   Pass
a=20; b=10; y_correct = 21.4602; assert(abs(inscribed_circle_4(a,b)-y_correct)<0.001)

2   Pass
a=5; b=2; y_correct = 1.8584; assert(abs(inscribed_circle_4(a,b)-y_correct)<0.001)

3   Pass
a=5; b=3; y_correct = []; assert(isempty(y_correct))

4   Pass
a=54*pi; b=49*pi; y_correct = []; assert(isempty(y_correct))

5   Pass
a=23.5; b=2.6; y_correct = 25.2407; assert(abs(inscribed_circle_4(a,b)-y_correct)<0.001)

Suggested Problems

More from this Author149

Community Treasure Hunt

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

Start Hunting!