H
hakansilver
Dear all,
We try to access a third party Matlab dll (which was created using Matlab
COM Builder) from C#. It works fine when using strings and one-dimensional
arrays but fails with two-dimensional arrays. We give our example of the code
below:
static void TestBasicStat()
{
MatlabCOM pda = new MatlabCOM();
Object mError = new int();
Array TempTagValues = new double[10, 20];
Object gaTagValues = new Object(); // This is the result from
Matlab. It should be a 2-dim array
pda.basicstatistics(2, ref gaTagValues, ref mError,
TempTagValues);
}
An exception is thrown from the Matlab code when Matlab tries to access the
two-dimensional array.
Does anyone know if a double array is the correct conversion to a Matlab
matrix?
Also, please let me know if this is not the right newsgroup to post for this
question.
Thank you in advance!
Best regards
Hakan
We try to access a third party Matlab dll (which was created using Matlab
COM Builder) from C#. It works fine when using strings and one-dimensional
arrays but fails with two-dimensional arrays. We give our example of the code
below:
static void TestBasicStat()
{
MatlabCOM pda = new MatlabCOM();
Object mError = new int();
Array TempTagValues = new double[10, 20];
Object gaTagValues = new Object(); // This is the result from
Matlab. It should be a 2-dim array
pda.basicstatistics(2, ref gaTagValues, ref mError,
TempTagValues);
}
An exception is thrown from the Matlab code when Matlab tries to access the
two-dimensional array.
Does anyone know if a double array is the correct conversion to a Matlab
matrix?
Also, please let me know if this is not the right newsgroup to post for this
question.
Thank you in advance!
Best regards
Hakan