title: Removing duplicate entries in a vector, when entries are complex and rounding errors are causing problems
body: <p>I want to remove duplicate entries from a vector on Matlab. The problem I'm having is that rounding errors are stopping the inbuilt Matlab function 'unique' from working properly. Ideally I'd like a way to set some sort of tolerance on the 'unique' function, or a small procedure that will remove the duplicates otherwise. If both the real and imaginary parts of two entries differ by less than 0.0001, then I'm happy to consider them equal. How can I do this?</p>
  
  <p>Any help will be greatly appreciated. Thanks</p>