フィルターのクリア

The theory of "_mergesimpts" of builtin functions.

8 ビュー (過去 30 日間)
Suyee Bai
Suyee Bai 2016 年 3 月 30 日
回答済み: Peng Liu 2016 年 8 月 22 日
I'm trying to learn the theory of the function "griddata",and in the file "griddata.m",I found some codes like: xyv = builtin('_mergesimpts', [y, x, v], [myepsy, myepsx, Inf], 'average'); I cant find the source code or theory of "_mergesimpts",can u explain the theory of it please? Thanks a lot.:)

回答 (2 件)

Walter Roberson
Walter Roberson 2016 年 3 月 30 日
By context I can tell that it looks for points whose x is closer than myepsx and whose y is closer than myepsy, and that if it finds them then it replaces the pair with a single point whose value is the average of the values at the other two points.
I do not know how it handles "lines" of points, A close to B close to C but A not close to C.
  1 件のコメント
Suyee Bai
Suyee Bai 2016 年 3 月 30 日
編集済み: Suyee Bai 2016 年 3 月 30 日
The results of some tests of the function are as follows:
x = 1:0.001:10;
x = x.';
x0 = builtin('_mergesimpts',x,0.001,'first');
x1 = builtin('_mergesimpts',x,0.005,'first');
x2 = builtin('_mergesimpts',x,0.2,'first');
x3 = builtin('_mergesimpts',x,0.5,'first');
x4 = builtin('_mergesimpts',x,1,'first');
x5 = builtin('_mergesimpts',x,2,'first');
the data of x0,x1,x3,x4,x5 showed its regularity but the data of x2 doesnt. it's really hard to understand this phenomenon.

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


Peng Liu
Peng Liu 2016 年 8 月 22 日
It is an undocumented built-in function, which finds unique elements/rows within a specified tolerance. You may find a detailed introduction about this functon: http://stackoverflow.com/questions/1988535/return-unique-element-with-a-tolerance
Matlab 2015a introduced a documented built-in function, uniquetol, to achieve a similar task.

カテゴリ

Help Center および File ExchangeRegression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by