Boolen logic operations between integer numbers
5 ビュー (過去 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 件)
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!