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.

Réponses (3)

Walter Roberson
Walter Roberson le 16 Juil 2011

0 votes

See the documentation for loadlibrary()
Chris Crain
Chris Crain le 16 Juil 2011

0 votes

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

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by