MATLAB: How to switch the value of a boolean.

boolean

Hi, is there any function to do the following :
a = true;
b = someFunction(a)
==> b = false
b = sumeFunction(b)
==> b = true;
thank you.

Best Answer

b = ~a;
c = ~b;
or if you are looking for the functional form
b = not(a);
c = not(b);
Related Question