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

1 view (last 30 days)
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.

Answers (0)

Categories

Find more on Just for fun in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!