title: How to turn off code generation in Simulink? (function is not supported for standalone code generation)
body: <p>I am creating a simulation which I will port to another language myself. So I don't need to use code generation capabilities of Simulink. How to turn it's attempts to allow code generation OFF?</p>
  
  <p>For example, I have the following code inside <code>MATLAB Function</code> block:</p>
  
  <pre><code>function OutImage = ResizeCropPad(InImage, Width, Height)
  %#codegen
  
      %coder.extrinsic('imresize');
  
      % resizing to defined height
      scale = Height/size(InImage,1);
      InImage = imresize(InImage, scale);
  
      % cropping to defined width
      if Width&lt;size(InImage,2)
          padarray(InImage, [0 size(InImage,2)-Width], 0, 'both');
      elseif Width&gt;size(InImage,2)
          b = floor((Width-size(InImage,2))/2);
          InImage = InImage(:,b:b+Width-1,:);
      end
  
      OutImage = InImage;
  </code></pre>
  
  <p>and it gives an error</p>
  
  <blockquote>
    <p>The function 'imresize' is not supported for standalone code
    generation. See the documentation for coder.extrinsic to learn how you
    can use this function in simulation.</p>
  </blockquote>
  
  <p>If I uncomment <code>coder.extrinsic('imresize')</code> line I get new error</p>
  
  <blockquote>
    <p>Expected either a logical, char, int, fi, single, or double. Found an
    mxArray. MxArrays are returned from calls to the MATLAB interpreter
    and are not supported inside expressions. They may only be used on the
    right-hand side of assignments and as arguments to extrinsic
    functions.</p>
  </blockquote>
  
  <p>Addressing line 11, with <code>if</code>.</p>
  
  <p>Why? Is it possible to completely disable code generation, for example at model level?</p>