Using a .mexw64 in a mexFunction

22 次查看(过去 30 天)
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.

采纳的回答

Jan
Jan 2012-4-15
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Write C Functions Callable from MATLAB (MEX Files) 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by