title: Find the count of output parameters in matlab function from C# through matlab dll
body: <p>I created a matlab dotnet dll using deploytool.
  Let us assume, I have the name of dll, name of the m file(method name), number of input arguments, count of output arguments, then I will be able to call the method.
  I am able to find the count of input arguments by looking at the methods parameters. 
  I am not able to find the count of output arguments.
  Is there a way I can find the count of output arguments for the m file from C#.
  I don't need the count of output arguments to invoke the method. I can put it as 1.
  But, I need the count to access all the outputs.</p>
  
  <p>This is the sample code: </p>
  
  <pre><code>function [a, b] = MyEcho ( a , b )
      disp 'a = ';
      disp(a);
      disp 'b = ';
      disp(b);
  end
  </code></pre>
  
  <p>I use the below method to invoke the method in m file.</p>
  
  <pre><code>public void MyEcho(int numArgsOut, ref MathWorks.MATLAB.NET.Arrays.MWArray[] argsOut, MathWorks.MATLAB.NET.Arrays.MWArray[] argsIn)
  </code></pre>
  
  <p>I use the below method to find the total input arguments. (a_in1, b_in1)</p>
  
  <pre><code>public MathWorks.MATLAB.NET.Arrays.MWArray[] MyEcho(int numArgsOut, MathWorks.MATLAB.NET.Arrays.MWArray a_in1, MathWorks.MATLAB.NET.Arrays.MWArray b_in1)
  </code></pre>