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
thanks for answare, Guilaume. But, My problem is i have set of complex number and i want to get the max value and min value from the set of that complex value. So, if there a new complex value, it will be chacked whether it's entered of into the range or not. So, how to make it ?? sorry for my bad english.
As I've said there is no ordering on the set of complex numbers. That also means that there is no min and max of complex numbers, since min and max just return the first of last element of the ordered set.
Now you can come up with an ordering function that at first may seem to give an order on the complex number, but it will break under the definition of anordered field (please read the link).
Mathworks have decided to give a definition to the min and max (maybe the shouldn't have), and as stated that definition compares the magnitudes of the numbers.
Mathworks also have decided to give a definition the comparison operators, but that uses a different ordering than min and max (just compares the real part). The two are not compatible.
Since there's no ordering on the complex numbers, there is also no definition of a range. So within, thefield of complex numbers, what you want to do makes no sense, and you should revise your problem.
Consider:
z1 = 5 + 1*1i
z2 = -7 + 3*1i
is
z3 = 6 + 2*1i
in range? it is if you compare the magnitude, it isn't if you compare the real part, it is if you compare the imaginary part.
thanks for answare Guilaume.. Thanks for your explanation. if you say there is no ordering in complex number, so what should i do ? the set of complex number that i have is represent value of feature extraction of an image. So, if there is new image with new feature extraction, will be chacked whether the result of the feature extraction is in the range of the set of feature extraction or not. so how to make it ? i am really dizzy.
Complex numbers are the same as points on a 2D plane. Given a set of points in a plane, can you tell which is the minimum and which is the maximum? No, the concept does not make sense. Same for complex numbers.
Similarly, given a set of points, can you tell if another point is in the range of these points? Well, first you have to define what you mean by the range of a set of points. Until you do that, we can't help you.
Possibly, you can define a point in range of a set of point if it is within theconvex hull of the set, but only you can decide that.
Thanks Azzi. But, i don't know what you mean. My problem is i have set of complex number and i want to get the max value and min value from the set of that complex value. So, if there a new complex value, it will be chacked whether it's entered of into the range or not. So, How to make it ? sorry for my bad english.
thanks for answare Azzi... i don't know. i don't understand about the complex number. So i ask. but, now i understand about the complex number. and the answare for your question is complex number cannot be compared to other complex number so, it can be determined.. it's right ?
you say that complex number can compare from their modulus, whether the modulus is meant is the remainder of the quotient ??
hi Guillaume, thank you so much for your answare and explanation. Yes, now i am understand. Thank you. May i ask once again ? whether you have reference ( ebook ) about complex number ? so i can make strong argument in my task about complex number. God Bless You. sorry for my bad english
Thanks Lain, but My problem is i have set of complex number and i want to get the max value and min value from the set of that complex value. So, if there a new complex value, it will be chacked whether it's entered of into the range or not. sorry for my bad english.
"Max is calculating the absolute value, and then taking the maximum value, despite being negative.Greater than is taking the value farthest from negative infinity."
Neither is true for complex numbers according to the documentation.
@eliz, I asked because your question had already been answered several times and it seemed to me you were not satisfied with these responses. So my guess was that you tried to ask something different, something we did not yet understand.
hi Torsten. oohhh I am Sorry, May be it became misunderstand, it not mean i am not satisfied with the answare, but, i confused so i ask again. But thank you so much. May i ask once again ? whether you have reference ( ebook ) about complex number ? so i can make strong argument in my task about complex number. God Bless You. sorry for my bad english
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
0 Comments
Sign in to comment.