Date: May 9, 2013 11:27 AM
Author: Krzysztof
Subject: Neural Network from Maltab R2012a in Labview

Hi,

I'm trying to export neural network from Matlab to dll and run it in Labview. Has anyone try to do this in Matlab R2012a?

I know I must compile m-file script to c code and next write a wrapper to convert from mxArray to double. I was using
http://www.labviewpro.net/upfiles/dllmatlablabview.pdf
but I have newer Matlab compiler version and presented commands are no longer avaliable. Anyway I managed to compile m-file to c code (using deploytool) and wrote a simple wrapper and then compiled it to one dll library (using mbuild -link shared -llibmx). However dll isn't working properly.

I think the reason is to understand how to get data from function generated by Matlab compiler called mclMlfFeval:

bool MW_CALL_CONV mlfMyFunction(int nargout, mxArray** Results, mxArray* Input)
{
return mclMlfFeval(_mcr_inst, "MyXOR", nargout, 1, 1, Results, Input);
}

I don't understand why Results is a pointer to poiner. Does anyone know how to get data from this function?