title: Correct use of tilde operator for input arguments
body: <p><strong>Function:</strong></p>
  <p>My MATLAB function has one output and several input arguments, most of which are optional, i.e.:</p>
  <pre><code>output=MyFunction(arg1,arg2,opt1,opt2,...,optN)
  </code></pre>
  <p><strong>What I want to do:</strong></p>
  <p>I'd like to give only arg1, arg2 and the last optional input argument optN to the function. I used the tilde operator as follows:</p>
  <pre><code>output=MyFunction(str1,str2,~,~,...,true)
  </code></pre>
  <p><strong>Undesired result:</strong></p>
  <p>That gives the following error message:</p>
  <pre><code>Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.
  </code></pre>
  <p>The error points to the comma after the first tilde, but I don't know what to make of it to be honest.</p>
  <p><strong>Problem identification:</strong></p>
  <ul>
  <li><p>I use MATLAB 2013b, which supports the tilde operator.</p>
  </li>
  <li><p>According to MATLAB's documentation the above function call should work:</p>
  <blockquote>
  <p>You can ignore any number of function inputs, in any position in the argument list. Separate consecutive tildes with a comma...</p>
  </blockquote>
  </li>
  <li><p>I guess there are a few workarounds, such as using '' or [] as inputs, but I'd really like to understand how to correctly use '~' because actually leaving inputs out allows me to use exist() when checking the input arguments of a function.</p>
  </li>
  </ul>
  <p>If you need any further info from me, please let me know.</p>
  <p>Thank you very much!</p>