Further to my original question, i now need to find the difference between two vectors of different sizes , but the terms that are new will not be unique ie,
a = [-1 1 2 -2 1 -1 -2 -2 1 -1 -2 2 -1 1]
b = [-1 1 2 -2 1 -1 1 -1 -2 2 -1 1]
hence the difference between these two vectors are the two -2 terms at the centre of a .
The current code will only find new terms that have not appeared before but not the difference in the vectors.
Appreciate any help, thanks.