title: C# array into MWarray Matlab
body: <p>I have an MxNx3 matrix and i want to transfer it into matlab using <code>MWArray</code>.<br>
  Here is my code, however there is no CTOR for that.<br>
  Is there any way to do it?</p>
  
  <pre><code>RGBImage image = _currentImage as RGBImage;
  
  int height = image.Height;
  int width = image.Width;
  
  //transform the 1D array of byte into MxNx3 matrix 
  byte[, ,] rgbByteImage = new byte[3, height, width];
  if (image[0].Bpp &gt; 16)
  {
      for (int i = 0; i &lt; height; i++)
      {
          for (int j = 0, k = 0; k &lt; width; j = j + 3, k++)
          {
              rgbByteImage[0, i, k] = image[0].Data[i * width + j]; 
              rgbByteImage[1, i, k] = image[0].Data[i * width + j + 1]; 
              rgbByteImage[2, i, k] = image[0].Data[i * width + j + 2 ]; 
          }
      }
  }
  
  MWNumericArray tempArr = new MWNumericArray(rgbByteImage);
  </code></pre>