what does x=6 means
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
mariam moutaz
le 25 Fév 2021
Modifié(e) : mariam moutaz
le 25 Fév 2021
x=6 y=7 disp(x&&y)
why is the answer 1
1 commentaire
Walter Roberson
le 25 Fév 2021
https://www.mathworks.com/help/matlab/ref/logicaloperatorsshortcircuit.html
Réponse acceptée
David Hill
le 25 Fév 2021
You can run the code and find out the answer. This is all about logical operations.
logical(6)&&logical(7);% by using && it converts 6 and 7 into their logical equivalent and AND them together
logical(-1);%logical of anything other than zero is 1
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!