Problem 45338. Area-04
Solution Stats
Problem Comments
-
3 Comments
Asif, Thanks for another nice problem.
I think the description would be improved if it said the "red shaded portion", because there are two shaded portions in the drawing.
@ChrisR Going by the test suite I think the illustration should actually look like this:
clear variables
close all
[a, b] = deal(7, 2);
rectangle("Position", [-a/2 0 a b])
rectangle("Position", [-a/2 0 a/2 b], "FaceColor", "red")
rectangle("Position", [ -b 0 b b], "Curvature", [1 1], "FaceColor", "white")
rectangle("Position", [ 0 0 b b], "Curvature", [1 1])
axis equal
set(gca, "XTick", [], "YTick", [], "XColor", "w", "YColor", "w")
You're right, Christian. Thanks for correcting my comment, which I deleted.
Solution Comments
Show commentsProblem Recent Solvers16
Suggested Problems
-
40529 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
366 Solvers
-
Spherical radius given four points
149 Solvers
-
Determine if input is a Narcissistic number
191 Solvers
-
Calculate cosine without cos(x)
107 Solvers
More from this Author165
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!