how to switch the value of a boolean.
80 次查看(过去 30 天)
显示 更早的评论
Hi, is there any function to do the following :
a = true;
b = someFunction(a)
==> b = false
b = sumeFunction(b)
==> b = true;
thank you.
0 个评论
采纳的回答
Honglei Chen
2012-9-7
编辑:Honglei Chen
2012-9-7
b = ~a;
c = ~b;
or if you are looking for the functional form
b = not(a);
c = not(b);
0 个评论
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!