Prev: Estimation of Smooth Transition Regression models
Next: remove nearly duplicate entries: type double
From: Keyne Dirks on 2 Mar 2010 04:30 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! |