title: Defining Variable-size input data for Matlab Coder
body: <p>I'm trying to generate a mex code file from the .m file using Matlab coder. The code for which is</p>
  
  <pre><code>function [result,x]=tesrank(A,x)
  
  result = [];
  n = x;
  for col= 1:n
     result = [result, sum(A==col, 2)];
  end
  </code></pre>
  
  <p>For fixed size, I'm able to get it using</p>
  
  <pre><code>codegen tesrank -args {zeros(2,3), zeros(1)}
  % Here size(A)=2x3 and size(x)=1x1
  </code></pre>
  
  <p>How do I do it without limiting the size of A and x? </p>