what does x=6 means

조회 수: 3 (최근 30일)
mariam moutaz
mariam moutaz 2021년 2월 25일
편집: mariam moutaz 2021년 2월 25일
x=6 y=7 disp(x&&y)
why is the answer 1
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 2월 25일
https://www.mathworks.com/help/matlab/ref/logicaloperatorsshortcircuit.html

댓글을 달려면 로그인하십시오.

채택된 답변

David Hill
David Hill 2021년 2월 25일
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개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by