フィルターのクリア

Removing top and bottom outliers

2 ビュー (過去 30 日間)
Nicholas Omoding
Nicholas Omoding 2021 年 7 月 12 日
編集済み: Scott MacKenzie 2021 年 7 月 12 日
I’ve surface damage depth (D) for 3D points (x, y, z). I’d like remove top and bottom 5% of the D values with their corresponding (x, y, z) from the matrix so that I can plot the remaining 90% of the points. Based on the attached sub set of the data, please kindly assist on the based way to achieve this with the rmoutliers function?

採用された回答

Scott MacKenzie
Scott MacKenzie 2021 年 7 月 12 日
編集済み: Scott MacKenzie 2021 年 7 月 12 日
Yes, the rmoutliers function will do the trick. After removing the top and bottom 5% of the values, the vectors below are reduced from 100 elements each to 90 elements each.
% test data
x = rand(1,100);
y = rand(1,100);
z = rand(1,100);
D = rand(1,100);
[D, TF] = rmoutliers(D, 'percentiles', [5 95]);
x(TF) = [];
y(TF) = [];
z(TF) = [];
whos
Name Size Bytes Class Attributes D 1x90 720 double TF 1x100 100 logical x 1x90 720 double y 1x90 720 double z 1x90 720 double

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSmoothing and Denoising についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by