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
Show
5 older comments
Stefan
on 3 Apr 2012
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))
Ned Gulley
on 3 Apr 2012
I went ahead and fixed the calling syntax on that.
Kuifeng
on 4 Apr 2012
Thanks for the corrections!
Abdelhak ARESMOUK
on 5 Dec 2012
You should correct the first test!
Li Ding
on 22 Oct 2017
The first test case is wrong.
Rafael Hernandez-Walls
on 20 Nov 2017
The first test case is wrong, is FALSE
Jeremy Perez
on 16 Sep 2020
Is the Point on a Disk?
Is the Point inside a Circle?
Ignacio Davila
on 18 Oct 2022
The first test is still wrong! It has not been corrected.
Solution Comments
Show commentsProblem Recent Solvers449
Suggested Problems
-
7652 Solvers
-
939 Solvers
-
518 Solvers
-
629 Solvers
-
6418 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!