フィルターのクリア

Remove unwanted noise from scatter plot using Matlab

15 ビュー (過去 30 日間)
Abeer Aboul Azm
Abeer Aboul Azm 2022 年 3 月 5 日
編集済み: Image Analyst 2022 年 3 月 5 日
How can I remove unwanted noise . as shown in attached figure marked by red circles.
  1 件のコメント
Simon Chan
Simon Chan 2022 年 3 月 5 日
Any criteria to determine which data belongs to noise? Such as data outside certain range in x and y-direction?

サインインしてコメントする。

回答 (2 件)

Scott MacKenzie
Scott MacKenzie 2022 年 3 月 5 日
編集済み: Scott MacKenzie 2022 年 3 月 5 日
There are many ways to approach this, for example using smoothdata or rmoutliers. Both functions have options to control how the data are smoothed or have outliers removed. Here's an example using rmoutliers:
M = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/915134/data.xlsx');
tiledlayout('flow')
nexttile;
x = M(:,1);
y = M(:,2);
scatter(x,y, 'filled');
set(gca, 'XLim', [-60 60], 'ylim', [-200 200]);
nexttile;
M = rmoutliers(M, 'percentiles', [0.5 99.5]);
x = M(:,1);
y = M(:,2);
scatter(x,y, 'filled');
set(gca, 'XLim', [-60 60], 'ylim', [-200 200]);

Image Analyst
Image Analyst 2022 年 3 月 5 日
編集済み: Image Analyst 2022 年 3 月 5 日
One way might be to use dbscan. This clustering method finds all groups that can be connected by path segments of a certain length. If a data point is farther away from any point in an existing cluster than the specified distance, then it's considered to be part of a separate cluster. So the clusters can be any shape, the only requirement is that all the points in the cluster are no farther away from another point in a cluster than the distance you specify. So it's very good at identifying irregularly shaped clusters.
I'm attaching a demo of dbscan. What you want to do is to use dbcan() to identify clusters and then delete all data points that are not part of the cluster with the most data points in it. If you can't figure out how to apply it, let me know.

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by