Lets say I have a dataset like below.
X = [170,85; 165,75; 180,100; 190,120; 160,80; 170,70];
a distance vector
Y = [10,20];
a data point
Z = [166,77];
I want to find all the points of X that fall within the distance Y from the point Z
Answer should be ans = [170,85; 165,75; 160,80; 170,70]
How can I do this in Matlab