verification of the intepretation of a simple code that contains "isequalwithequalnans"
1 次查看(过去 30 天)
显示 更早的评论
Could you please verify the interpretation of the code
if ~(isequalwithequalnans(a, b) ==1 | isequalwithequalnans(a, c) ==1)
'not ok'
End
My interpretation is the following
If (a and b) are not equal OR (a and c) are not equal then
“Not ok”
0 个评论
采纳的回答
Andrei Bobrov
2012-7-6
编辑:Andrei Bobrov
2012-7-6
isequalwithequalnans(a,b) | isequalwithequalnans(a,c)
4 个评论
C.J. Harris
2012-7-6
Maybe I'm missing something here, but this is still not correct. Notice the NOT symbol (~) in the original statement. Your answer is the opposite of the correct answer.
更多回答(1 个)
C.J. Harris
2012-7-6
编辑:C.J. Harris
2012-7-6
No, that interpretation is NOT correct.
The statement says if BOTH b and c are different to a then 'Not ok'. Or in other words it is 'ok' as long as either b OR c is equal to a.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!