필터 지우기
필터 지우기

How to pass 2D .net array to matlab

조회 수: 7 (최근 30일)
simran chemical
simran chemical 2021년 2월 19일
답변: Anmol Dhiman 2021년 2월 27일
I have the following matlab function-
function [C]=myfun(A,B)
C=A+B
end
I used the .Net builder to use my matlab function in my C# project.After giving the references to the dll of the function as well as the MWArray dll in my project. I want to pass the following two multidimensional array to myfun.
int[,] a ={ { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } }; //Matrix 1
int[,] b ={ { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } }; //Matrix 2
Class1 obj = new Class1();
result = obj.myfun(a,b);
I am not able to convert the two matrices to MWArray type. Can anyone guide me how to do this?

답변 (1개)

Anmol Dhiman
Anmol Dhiman 2021년 2월 27일
Hi Simran,
You can refer to a similar answer.
Hope it Helps

카테고리

Help CenterFile Exchange에서 Deploy to .NET Applications Using MWArray API에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by