remove outliers from a circumference
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
luca antonioli
am 16 Okt. 2019
Kommentiert: darova
am 17 Okt. 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?
0 Kommentare
Akzeptierte Antwort
darova
am 16 Okt. 2019
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
plot3(x(ind),y(ind),z(ind),'or')
2 Kommentare
darova
am 17 Okt. 2019
Opps! Data should be replaced to 'origin'. Try:
[t,r] = cart2pol(x-x0,y-y0); % convert your data to polar system
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multirate Signal Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!