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

1 回表示 (過去 30 日間)
Mehdi
Mehdi 2015 年 9 月 21 日
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 Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by