Author Topic: Matlab call C#/COM - 2D matrix of mixed types (string, int, doubles)  (Read 1064 times)

Offline devvvy

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
hello

Has anyone tried call .NET/C# (COM) from Matlab? And have COM to return a 2D Matrix of mixed types?

{string, int, double, datetime}

I need to call .NET from Matlab a function with signature as follows:

public object[,] RunStoredProc(string strProcName, ref object[,] oResult, params object[] args)
      {
         object[,] oResultMatrix =  { { "abc", 7.81, 7.82, 7.83, 7.84, 7.85}, {"xyz", 1.08, 1.09, 1.10, 1.11, 1.12} };

         return oResultMatrix;
      }


And also can you pass param as out/ref/params? And return type, can it be a 2d matrix?

Thanks

Matlab and SimuLink Development Forum