MATLAB: What does x=6 means

mean

x=6 y=7 disp(x&&y)
why is the answer 1

Best Answer

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