MATLAB: Looping for finding dominating points.

filter dominating points

Hi,
I have a matrix with 'n' rows and two columns, say,
f(1,1) f(1,2)
f(2,1) f(2,2)
f(3,1) f(3,2)
f(4,1) f(4,2)
…………
f(n,1) f(n,2)
I would like to remove dominating row or rows, and record non-dominating rows as a data file. It would be much appreciated if any one can help me with coding to do that.
Thanks in advance.
Rizvi

Best Answer

Mohammed Rizvi, in a forum of this nature you really ought to carefully define a concept such as "dominating points" so as to avoid causing an excess of guessing at what you mean.
I will guess that you mean by a "dominating point", a point in a given 2D set for which a straight line can be drawn that separates that point from all other points in the set. If that is what you mean, you could call on 'convhull'. Call your n x 2 matrix f.
K = convhull(f(:,1),f(:,2),'simplify',true);
f(K,:) = [];
This should strip away all "dominating points" of f.
You used the term "looping" in your subject title. I would warn that removing dominating points one at a time can result, if not done properly, in removing too many points, as remaining points that weren't previously dominating points suddenly become dominating ones. It is much better to use a function like 'convhull' which does the job simultaneously (so to speak.)