title: How to put a conditional output in Matlab function?
body: <p>If my function is:</p>
  
  <pre><code>[k_well_testing_dd_sisim,k_well_testing_bup_sisim]=k_from_well_testing_general(nModel_want,P_dd,t_dd_days,P_bup,t_bup_days)
  </code></pre>
  
  <p>Now I have this condition in my function's body:</p>
  
  <pre><code>if nargin==5
  
  k_well_testing_bup_sisim=by_some_formulas; % I get k_well_testing_bup_sisim by some formulas
  
  end
  </code></pre>
  
  <p>Notice that I will get <code>k_well_testing_bup_sisim</code> as the output only when <code>nargin==5</code> is satisfied i.e. I have 5 input arguments to my function. However, if I choose not to input 5 arguments, how can I make sure that outputs in first line of function definition ignores the second output variable? Thanks!</p>