Relational operations problems (real and imag parts)
1 view (last 30 days)
Show older comments
Hello all!
I want to replace this line
if imag(LAMBD(m,m)) ~= 0
into
if imag(LAMBD(m,m)) == 0
because the operation "~=" (even without imag()) is testing the imaginary part of LAMBD, but it doesn't work.
I have no idea why...
Thanks,
Kate
1 Comment
Matt J
on 25 Nov 2012
I'm skeptical that it doesn't work. And you haven't provided any illustration to prove it...
Accepted Answer
Ekaterina
on 25 Nov 2012
More Answers (2)
Azzi Abdelmalek
on 25 Nov 2012
Maybe it's about numerical problems, for example try this
0.3-0.2==0.4-0.3
%you will find 0
0 Comments
Ekaterina
on 25 Nov 2012
1 Comment
Matt J
on 25 Nov 2012
Edited: Matt J
on 25 Nov 2012
Yes, and we wouldn't be interested in seeing all 600 lines of your code. However, only a small number of those lines are actually causing trouble. Therefore, it should be easy for you to construct a separate, small, simplified example based on those lines.
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!