Friday, 9 August 2013

How can I formulate the intersection of 2 VECTORS

How can I formulate the intersection of 2 VECTORS

I have 2 vectors A = {a1,...,an} and B = {b1,...,bn}
I want to calculate the intersection between these 2 vector C = A
(Inter)B. Where if a1 = b1 then c1 = 1, if a1 != b1 then c1 = -1.
I just want to know if my formulation is correct:

No comments:

Post a Comment