I have a vector of real and complex number, and without using a routine i was wondering if there is a comand to find the numbers with smallest imaginary part and their index in the vector. So for example if the vector is v = [1 2 3 4+5i 6+7i 8 9+10i] the output that i want (if i want for example the 2 smallest) is
b = [4+5i 6+7i] and i = [4 5].
Best Answer