use of mxArray in C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I give you here some example code how to make it possible to use the type
mxArray (from matlab) in c and c++. mxArray is defined in matlab.h and
matlab.hpp. To use mxArray in c or c++ you need to include this h-file..and
maybe some libraries also.
My question is: How can I use mxArray in C#??

(If it is this easy in c and c++ there must be a way out in c# also..)

---------------------------------------------------
#include "mat.h"
#include "matlab.h"

#pragma comment(lib, "libmat.lib")
#pragma comment(lib, "libmx.lib")
#pragma comment(lib, "libmatlb.lib")
#pragma comment(lib, "libmmfile.lib")

void main(int argc, char **argv)
{
mxArray *pa;
....

--------------------------------------------------
#include "matlab.hpp" //Interface of MATLAB CPP Math Library

//Add C++ Math Library to project
#pragma comment(lib, "libmatpm.lib")
#pragma comment(lib, "libmx.lib")
#pragma comment(lib, "libmatlb.lib")
#pragma comment(lib, "libmat.lib")
#pragma comment(lib, "libmmfile.lib")
#pragma comment(lib, "libmatpm.lib")
....
----------------------------------------------------
 
Back
Top