title: MATLAB: Inverting a boolean value quickly
body: <p>Is there a quicker way than the following to 'flip' a true or false to its opposite state?</p>
  
  <pre><code>if x == true
   x = false;
  else
   x = true;
  end
  </code></pre>
  
  <p>Yes, perhaps only five lines of code is nothing to worry about but something that looks more like this would be fantastic:</p>
  
  <pre><code>x = flip(x);
  </code></pre>