MATLAB Answers


remove outliers from a circumference

Asked by luca antonioli on 16 Oct 2019
Latest activity Commented on by darova
on 17 Oct 2019
hi guys.. I have a series of points, those points generates a sort of circumference/ellipse in the 3d space ( intersection between a shpere and a cone).. i want to get rid of the outliers....I've tried using rmoutliers, but nothing.. can you help me?


Sign in to comment.

1 Answer

Answer by darova
on 16 Oct 2019
 Accepted Answer

Here is an idea:
x0 = mean(x); % Choose some center point (maybe approximately)
y0 = mean(y);
[t,r] = cart2pol(x,y); % convert your data to polar system
[~,ix] = sort(t); % sort your data by angle
tol = 0.4; % some tolerance
ix1 = find(diff(r(ix) > tol); % find values where difference of radius is too big
ind = ix(ix1); % indices of outlier points


yes, it is a good idea..but how to consider the center of the circumference?
you calculate x0 and y0 but you dont use these points!
on 17 Oct 2019
Opps! Data should be replaced to 'origin'. Try:
[t,r] = cart2pol(x-x0,y-y0); % convert your data to polar system

Sign in to comment.