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”

采纳的回答

Andrei Bobrov
Andrei Bobrov 2012-7-6
编辑:Andrei Bobrov 2012-7-6
isequalwithequalnans(a,b) | isequalwithequalnans(a,c)
  4 个评论
C.J. Harris
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
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.

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by