Can there be a mistake about the answer for the last test suite? y_correct is given as 3 so the case where all edges are tangent to circle but when I draw it I see a pentagon that does not touch the circle at all and it is clearly visible without zooming so I don't think error is less than 0.02. I find the answer as y=4 which I think is correct. Can you please check it?
I do believe that it was within the tolerance, though that last case did not touch the pentagon, as you mentioned. I slightly increased the radius in that test case to reduce the gap between the pentagon and circle.
Hi, goc3. Nice problem. I have one piece of feedback. I anticipated in a "Cody5:Hard" problem that the pentagon & circle couldn't be assumed to have the same centre if it weren't stated in the problem, but roughly they do seem to share a centre in the present Test Suite. If that is the case, then I suggest either explicitly mentioning it in the Problem Statement, or else adding more test cases where the shapes don't share a centre. An example of the latter would be a tiny circle centred midway along one of the edges of a large pentagon (correct answer 2, but would probably be misclassified if centres assumed equal). Regards, DIV
Agree with David.
Moreover it is not mentioned that pentagon is regular (didn't check all cases, but most of them are regular).
Summing Digits within Text
Renaming a field in a structure array
Convert a numerical matrix into a cell array of strings
Create an index-powered vector
Sum of odd numbers in a matrix
Legend of Zelda - Rupee Count (Compact)
Divisible by 9
Lights Out 12 - 5x5, three stages, <7 moves
Weighted Gold/Silver Standard
Combined Ages 2 - Symmetric, n ≥ 3
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office