Parsing MWNumericArray to C# code optimization
As usual with performance problems the only way of knowing for sure is to use a profiler and check which piece of code is taking the longest time. However looking at the code you are copying the matrix element by element which is typically the slowest way to go. Often there is a method which can do that as a bulk operation for you.

I don't know much about the Matlab stuff as I've never used it but I found this question on Stackoverflow which has a couple of answers showing a single line statement of copying it. Based on one of these answers your code for the 2D case could look like this:

double[,] data = (double[,])matrix.ToArray(MWArrayComponent.Real);


I assume in the 3D case you'll get a double[,,] back which you might have to take apart afterwards so it fits your List&lt;double[]&gt; type.

Apart from that:

This exception has a misleading message in case the dimensions are less than 2


if (dimensions.Length &gt; 3 || dimensions.Length &lt; 2)
{
    throw new ArgumentException("Input matrix dimensions are too long", "Three is the max dimensions");
}