title: How MATLAB's "if" function handles multiple inputs
body: <p>I ran a quick test to see how <code>if</code> deals with multiple input values.  It appears that the default behavior is to apply <code>and</code> to the collection of values, but I couldn't find any documentation.  Can anyone confirm or provide a counterexample?</p>
  
  <pre><code>&gt;&gt; if([1,1,1]) disp(sprintf('hi'));end;
  hi
  &gt;&gt; if([1]) disp(sprintf('hi'));end;
  hi
  &gt;&gt; if([1,1,0]) disp(sprintf('hi'));end;
  </code></pre>
  
  <p>EDIT: to clarify,  I don't intend to try to use this "feature," but wanted to be sure I knew how erroneous input would be handled.  Suppose, for example, your code read 
  <code>if(my_function)</code>  and the (badly written) <code>my_function</code> usually returns a single value but occasionally returns multiple values.  Good practice, of course , would parse the returned values appropriately and feed a single value to <code>if</code>.</p>