Boolen logic operations between integer numbers
1 次查看(过去 30 天)
显示 更早的评论
Dear All,
I would like to know the reasons why this happens:
>> 3 && -4
ans =
1
Thanks in advance for your kindly support.
Best Regards,
Josh
0 个评论
采纳的回答
Alexandra Harkai
2016-11-22
编辑:Alexandra Harkai
2016-11-22
>> logical(3)
ans =
1
>> logical(-4)
ans =
1
2 个评论
Guillaume
2016-11-22
To add to this, only 0 is considered false by matlab (and many many other languages)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!