title: I got error message about simulink "Output argument is not assigned on some execution paths"
body: <p>In simulink, I made some model using "MATLAB function"block
  but I met error message here.</p>
  
  <h2>here is code and error message.</h2>
  
  <pre><code>function [VTAS,postVTAS]=fcn(mode,initialVTAS,a,t,preVTAS)
  
  if mode == 1
       VTAS = initialVTAS + (a * t) ;
       postVTAS = VTAS;
  
   elseif mode == 2
       datasize = length(preVTAS);
       lastvalue = preVTAS(datasize);
       VTAS = lastvalue + 0;
       postVTAS = VTAS;
  
   end
  
   end
  </code></pre>
  
  <hr>
  
  <p>Output argument 'VTAS' is not assigned on some execution paths.</p>
  
  <p>Function 'MATLAB Function' (#36.25.28), line 1, column 26:</p>
  
  <p>"fcn"</p>
  
  <h2>Launch diagnostic report.</h2>
  
  <p>I think there is no problem about output "VTAS"</p>
  
  <p>please teach me what is a problems.</p>