本文主要是介绍Matlab C Library Call Matlab Built-In Functions,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
原文:http://note.sonots.com/Mex/Builtin.html
Syntax
#include "mex.h" int mexCallMATLAB(int nlhs, mxArray *plhs[], int nrhs,mxArray *prhs[], const char *name);
Arguments
- nlhs
- Number of desired output arguments. This value must be less than or equal to 50. plhs
- Array of pointers to mxArrays. The called command puts pointers to the resultant mxArrays into plhs and allocates dynamic memory to store the resultant mxArrays. By default, MATLAB automatically deallocates this dynamic memory when you clear the MEX-file. However, if heap space is at a premium, you may want to call mxDestroyArray as soon as you are finished with the mxArrays that plhs points to. nrhs
- Number of input arguments. This value must be less than or equal to 50. prhs
- Array of pointers to input arguments. name
- Character string containing the name of the MATLAB built-in, operator, M-file, or MEX-file that you are calling. If name is an operator, just place the operator inside a pair of single quotes, for example, '+'.
Returns
0 if successful, and a nonzero value if unsuccessful.
这篇关于Matlab C Library Call Matlab Built-In Functions的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!