same matrix but not equal problem
Show older comments
I have two matrix: C and C1, they are totally the same, but when I used
isequal(C,C1)
Matlab returns 0.
could anyone help me figure why this happens?
Best! Yu
Accepted Answer
More Answers (1)
Walter Roberson
on 7 Jun 2018
The matrices contain NaN. It is a property of NaN that NaN ~= NaN
>> isequaln(C,C1)
ans =
logical
1
(requires R2012a or later)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!