Comparison of complex Numbers
- From: "Adrian Lehrmann" <mail@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 8 Jan 2006 10:29:48 -0500
Hi,
I need to test if a certain complex number is already an element of a
vector.
Think of the (complex) vector
nst = [1.2599, -0.62996+1.0911i]
Now, the complex number that I want to test might be
phi(1,1) = 1.2599-0.0000i.
The difference of the imaginary part of those numbers (in this
special case) is
imag(phi(1,1))-imag(nst(1,1)) = -2.2959e-041
Testing
if phi(1, 1) == nst (1,:) doesn't work, since Matlab says that
those numbers aren't equal.
Does anyone know an efficient way to consider those numbers as equal?
Thanks in advance for your replies and for excusing my poor english
;)
Adrian
.
- Follow-Ups:
- Re: Comparison of complex Numbers
- From: Roger Stafford
- Re: Comparison of complex Numbers
- From: Jos
- Re: Comparison of complex Numbers
- Prev by Date: matlab如何用for loop來寫convolution
- Next by Date: help for project
- Previous by thread: matlab如何用for loop來寫convolution
- Next by thread: Re: Comparison of complex Numbers
- Index(es):
Relevant Pages
|