From: Lorenzo Guerrasio on 2 Mar 2010 04:47 I guess a combination of round and unique on opportunely scaled values should work. "Keyne Dirks" <keynedirks(a)hotmail.com> wrote in message <hmiltq$gld$1(a)fred.mathworks.com>... > Is there an easy way to remove nearly duplicate entries from a vector. > > Lets say I have a vector 'b' with four complex numbers: > > b = > -0.940695022020893 - 0.338266306091317i > -0.940695022020893 + 0.338266306091317i > -0.941324562670116 - 0.338492683806694i > -0.941324562670116 + 0.338492683806694i > > As you can see the 1st and 3rd numbers are nearly the same and the 2nd and 4th are also almost the same. I would like to be able to detect that these are about the same and discard one of them. > > Thanks in advance!
|
Pages: 1 Prev: remove nearly duplicate entries: type double Next: matlab |