Using a .mexw64 in a mexFunction

1 visualización (últimos 30 días)
Jane Jean
Jane Jean el 15 de Abr. de 2012
Hello,
I've compiled a mexFunction function1.mexw64 and it works perfectly. Now I need this function in another mexFunction of which the compiled version would be function2.mexw64. Is it possible to call a compiled mexFunction in the body of another mexFunction? If yes, how do I do so?
Thanks.

Respuesta aceptada

Jan
Jan el 15 de Abr. de 2012
Either insert the C-source of function1.c without the mexFunction gateway to function2.c. Or call function2 through mexCallMATLAB:
mxArray *Input[1];
Input[1] = mxCreate...
mexCallMATLAB(0,NULL,1, Input, "function2");
The later is less efficient due to the double overhead of calling Matlab to call the mex.

Más respuestas (0)

Categorías

Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by