Passing DataTypes from MatLab to C#

I am a Matlab newbie, sorry for this basic question... I am trying to format the data in matlab to resemble something like a byte array so my function in c# can read it. Any suggestions.
Example of what I hope is possible.
MatLab.send(someArray of uint8 values) => C#.receive(byte[] inputData)
Thanks in advance.

Answers (3)

Walter Roberson
Walter Roberson on 16 Jul 2011
See the documentation for loadlibrary()
Chris Crain
Chris Crain on 16 Jul 2011
I looked through the document for loadLibrary, the only thing I seen that could remotely work was libpointer but I tried that and it did not work.
MatLab side:
data = libpointer('uint8', 255);
C# side (Intptr inputData) this errors out. ??? Error: Type mismatch, argument 1

Categories

Asked:

on 16 Jul 2011

Community Treasure Hunt

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

Start Hunting!