Boolen logic operations between integer numbers
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Josh Shamir
am 22 Nov. 2016
Kommentiert: Josh Shamir
am 22 Nov. 2016
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 Kommentare
Akzeptierte Antwort
Alexandra Harkai
am 22 Nov. 2016
Bearbeitet: Alexandra Harkai
am 22 Nov. 2016
>> logical(3)
ans =
1
>> logical(-4)
ans =
1
2 Kommentare
Guillaume
am 22 Nov. 2016
To add to this, only 0 is considered false by matlab (and many many other languages)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!