Problem 554. Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r.
Points = [x, y]; circle = (x0, y0, r)
Return true or false for each point tested
Solution Stats
Problem Comments
-
8 Comments
error in the test:
assert(isequal(your_fcn_name(x),y_correct))
Error: Undefined function or variable 'x'.
Should be:
assert(isequal(your_fcn_name(Points,circle),y_correct))
I went ahead and fixed the calling syntax on that.
Thanks for the corrections!
You should correct the first test!
The first test case is wrong.
The first test case is wrong, is FALSE
Is the Point on a Disk?
Is the Point inside a Circle?
The first test is still wrong! It has not been corrected.
Solution Comments
Show commentsProblem Recent Solvers439
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
47567 Solvers
-
Find relatively common elements in matrix rows
1994 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1697 Solvers
-
690 Solvers
-
Flag largest magnitude swings as they occur
670 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!