Using Matlab DLL in C# and the problem of converting arrays

1 visualización (últimos 30 días)
Mehdi
Mehdi el 21 de Sept. de 2015
I have a piece of code in Matlab and convert it to dll file to use in C#.
if true
MWNumericArray arr1 = teee; % n by 1
MWNumericArray arr2 = Bx; % n by 1
MWNumericArray arr0 = CoefAx; % n by n array
amgClass aobj = new aClass();
MWArray resultA = aobj.A((MWArray)arr0, (MWArray)arr2, (MWArray)arr1, 3, 2, 1, 1, 200, 0.000001, 2, 0.25);
end
The error I am getting is about the dimension of matrix which exceed in the code. I check the matlab code with matlab data and it works.
The only thing I feel can be a problem is about input dimensions.
C# 1D arrays are like : 1 by n but in Matlab they are like: n by 1
How can I change this arrangement? Any comments?
Thank you.

Respuestas (0)

Categorías

Más información sobre Just for fun en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by