how does griddata asses duplicates?
5 ビュー (過去 30 日間)
古いコメントを表示
Hi! I would like to understand how griddata asses duplicate point. I opened the function and I found this section:
%Need x,y and z to be column vectors
sz = numel(x);
x = reshape(x,sz,1);
y = reshape(y,sz,1);
v = reshape(v,sz,1);
myepsx = eps(0.5 * (max(x) - min(x)))^(1/3);
myepsy = eps(0.5 * (max(y) - min(y)))^(1/3);
% look for x, y points that are indentical (within a tolerance)
% average out the values for these points
if isreal(v)
xyv = builtin('_mergesimpts', [y, x, v], [myepsy, myepsx, Inf], 'average');
x = xyv(:,2);
y = xyv(:,1);
v = xyv(:,3);
could somebody explain me
xyv = builtin('_mergesimpts', [y, x, v], [myepsy, myepsx, Inf], 'average');
0 件のコメント
採用された回答
Adam Danz
2022 年 2 月 10 日
編集済み: Adam Danz
2022 年 2 月 11 日
That line calls Matlab's built-in static method or function matlab.internal.math.mergesimpts(). The comments describe what it's doing. It takes the x y v vectors and defines tolerance levels for each variable (myepsy, myepsx, Inf). The tolerance levels define which values are "identical" or "close enough to be identical". Identical values are then averaged to get rid of (near) duplicates.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で General Applications についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!