MATLAB: Max and min complex number

complex number

i have set that contain complex number, then i get the greatest value using max function and get the smallest value using min function. For example the max value is -0.0115230+0.0474206i and the minimum value is 0.0026796 + 0.0006868i But if i give this command -0.0115230+0.0474206i > 0.0026796 + 0.0006868i it get the result ans=0. So, how did it happen ? should the result is ans=1 ?? please help. i am very confused

Best Answer

It can be proven that complex numbers cannot be ordered (under the definition of an ordered field). That means that you cannot compare complex numbers.
As per the documentation, < (and co.) only compare the real part of a number, whereas min returns the complex number with the smallest magnitude.