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

1 次查看(过去 30 天)
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.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Just for fun 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by