Thanks. It's just very helpful!
Let me restate the dominance relationship
If a = (a1,a2,a3...,ak) and it is nondominated, then there does not exist any b = (b1,b2,b3...,bk) such that b1<=a1, b2<=a2...,bk<=ak.
Thank you again.
"Roger Stafford" wrote in message <jjphc7$jcu$1@newscl01ah.mathworks.com>...
> "Ho Cheung Brian" wrote in message <jjpabk$t0j$1@newscl01ah.mathworks.com>...
> > Input:
> > A =[1 6 3; 2 4 6;4 5 3];
> > B = [1 3 5;2 7 4];
> > Output:
> > [1 6 3; 4 5 3; 1 3 5]
> > (Order is not important)
> > **My goal is merging A and B and eliminate the nondominated vector**
> > i.e. A(2,:) and B(2,:)
> > (The elements of [1 3 5] are all smaller than [2 4 6], so [2 4 6] is dominated by [1 3 5], similar to [2 7 4], which is dominated by [1 6 3])
> > ........
>         
> I hope I have understood your problem correctly. Your use of the phrase "dominated by" is a bit misleading.
>
> A1 = reshape(A,size(A,1),1,[]);
> B1 = reshape(B,1,size(B,1),[]);
> output = [A(~any(all(bsxfun(@gt,A1,B1),3),2),:);...
> B(~any(all(bsxfun(@gt,B1,A1),3),1),:)];
>
> Roger Stafford
