Boolen logic operations between integer numbers
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Josh Shamir
el 22 de Nov. de 2016
Comentada: Josh Shamir
el 22 de Nov. de 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 comentarios
Respuesta aceptada
Alexandra Harkai
el 22 de Nov. de 2016
Editada: Alexandra Harkai
el 22 de Nov. de 2016
>> logical(3)
ans =
1
>> logical(-4)
ans =
1
2 comentarios
Guillaume
el 22 de Nov. de 2016
To add to this, only 0 is considered false by matlab (and many many other languages)
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!