Cody

Problem 45338. Area-04

Solution 2187057

Submitted on 1 Apr 2020
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   Fail
a=20; b=10; y_correct = 21.4602; assert(abs(inscribed_circle_4(a,b)-y_correct)<0.001)

Error using assert The condition input argument must be a scalar logical. Error in Test1 (line 4) assert(abs(inscribed_circle_4(a,b)-y_correct)<0.001)

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

Error using assert The condition input argument must be a scalar logical. Error in Test2 (line 4) 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   Fail
a=23.5; b=2.6; y_correct = 25.2407; assert(abs(inscribed_circle_4(a,b)-y_correct)<0.001)

Error using assert The condition input argument must be a scalar logical. Error in Test5 (line 4) assert(abs(inscribed_circle_4(a,b)-y_correct)<0.001)

Suggested Problems

More from this Author149