📄 sjbh1_mex.c
字号:
/*
* MATLAB Compiler: 3.0
* Date: Fri Sep 03 08:56:52 2004
* Arguments: "-B" "macro_default" "-O" "all" "-O" "fold_scalar_mxarrays:on"
* "-O" "fold_non_scalar_mxarrays:on" "-O" "optimize_integer_for_loops:on" "-O"
* "array_indexing:on" "-O" "optimize_conditionals:on" "-x" "-W" "mex" "-L" "C"
* "-t" "-T" "link:mexlibrary" "libmatlbmx.mlib" "sjbh1"
*/
#ifndef MLF_V2
#define MLF_V2 1
#endif
#include "libmatlb.h"
#include "mwservices.h"
#include "sjbh1.h"
#include "axis.h"
#include "grid.h"
#include "legend.h"
extern _mex_information _mex_info;
static mexFunctionTableEntry function_table[1]
= { { "sjbh1", mlxSjbh1, 1, 0, &_local_function_table_sjbh1 } };
static _mexInitTermTableEntry init_term_table[1]
= { { InitializeModule_sjbh1, TerminateModule_sjbh1 } };
/*
* The function "Mlegend" is the MATLAB callback version of the "legend"
* function from file "d:\matlab6p5p1\toolbox\matlab\graph2d\legend.m". It
* performs a callback to MATLAB to run the "legend" function, and passes any
* resulting output arguments back to its calling function.
*/
static mxArray * Mlegend(mxArray * * labelhandles,
mxArray * * outH,
mxArray * * outM,
int nargout_,
mxArray * varargin) {
mxArray * leghandle = NULL;
mclFevalCallMATLAB(
mclNVarargout(nargout_, 0, &leghandle, labelhandles, outH, outM, NULL),
"legend",
mlfIndexRef(varargin, "{?}", mlfCreateColonIndex()), NULL);
return leghandle;
}
/*
* The function "Mgrid" is the MATLAB callback version of the "grid" function
* from file "d:\matlab6p5p1\toolbox\matlab\graph2d\grid.m". It performs a
* callback to MATLAB to run the "grid" function, and passes any resulting
* output arguments back to its calling function.
*/
static void Mgrid(mxArray * arg1, mxArray * arg2) {
mclFevalCallMATLAB(mclAnsVarargout(), "grid", arg1, arg2, NULL);
}
/*
* The function "Maxis" is the MATLAB callback version of the "axis" function
* from file "d:\matlab6p5p1\toolbox\matlab\graph2d\axis.m". It performs a
* callback to MATLAB to run the "axis" function, and passes any resulting
* output arguments back to its calling function.
*/
static mxArray * Maxis(mxArray * * ans2,
mxArray * * ans3,
int nargout_,
mxArray * varargin) {
mxArray * ans1 = NULL;
mclFevalCallMATLAB(
mclNVarargout(nargout_, 0, &ans1, ans2, ans3, NULL),
"axis",
mlfIndexRef(varargin, "{?}", mlfCreateColonIndex()), NULL);
return ans1;
}
/*
* The function "mexLibrary" is a Compiler-generated mex wrapper, suitable for
* building a MEX-function. It initializes any persistent variables as well as
* a function table for use by the feval function. It then calls the function
* "mlxSjbh1". Finally, it clears the feval table and exits.
*/
mex_information mexLibrary(void) {
mclMexLibraryInit();
return &_mex_info;
}
_mex_information _mex_info
= { 1, 1, function_table, 0, NULL, 0, NULL, 1, init_term_table };
/*
* The function "mlfNLegend" contains the nargout interface for the "legend"
* M-function from file "d:\matlab6p5p1\toolbox\matlab\graph2d\legend.m" (lines
* 0-0). This interface is only produced if the M-function uses the special
* variable "nargout". The nargout interface allows the number of requested
* outputs to be specified via the nargout argument, as opposed to the normal
* interface which dynamically calculates the number of outputs based on the
* number of non-NULL inputs it receives. This function processes any input
* arguments and passes them to the implementation version of the function,
* appearing above.
*/
mxArray * mlfNLegend(int nargout,
mxArray * * labelhandles,
mxArray * * outH,
mxArray * * outM,
...) {
mxArray * varargin = NULL;
mxArray * leghandle = NULL;
mxArray * labelhandles__ = NULL;
mxArray * outH__ = NULL;
mxArray * outM__ = NULL;
mlfVarargin(&varargin, outM, 0);
mlfEnterNewContext(3, -1, labelhandles, outH, outM, varargin);
leghandle = Mlegend(&labelhandles__, &outH__, &outM__, nargout, varargin);
mlfRestorePreviousContext(3, 0, labelhandles, outH, outM);
mxDestroyArray(varargin);
if (labelhandles != NULL) {
mclCopyOutputArg(labelhandles, labelhandles__);
} else {
mxDestroyArray(labelhandles__);
}
if (outH != NULL) {
mclCopyOutputArg(outH, outH__);
} else {
mxDestroyArray(outH__);
}
if (outM != NULL) {
mclCopyOutputArg(outM, outM__);
} else {
mxDestroyArray(outM__);
}
return mlfReturnValue(leghandle);
}
/*
* The function "mlfLegend" contains the normal interface for the "legend"
* M-function from file "d:\matlab6p5p1\toolbox\matlab\graph2d\legend.m" (lines
* 0-0). This function processes any input arguments and passes them to the
* implementation version of the function, appearing above.
*/
mxArray * mlfLegend(mxArray * * labelhandles,
mxArray * * outH,
mxArray * * outM,
...) {
mxArray * varargin = NULL;
int nargout = 1;
mxArray * leghandle = NULL;
mxArray * labelhandles__ = NULL;
mxArray * outH__ = NULL;
mxArray * outM__ = NULL;
mlfVarargin(&varargin, outM, 0);
mlfEnterNewContext(3, -1, labelhandles, outH, outM, varargin);
if (labelhandles != NULL) {
++nargout;
}
if (outH != NULL) {
++nargout;
}
if (outM != NULL) {
++nargout;
}
leghandle = Mlegend(&labelhandles__, &outH__, &outM__, nargout, varargin);
mlfRestorePreviousContext(3, 0, labelhandles, outH, outM);
mxDestroyArray(varargin);
if (labelhandles != NULL) {
mclCopyOutputArg(labelhandles, labelhandles__);
} else {
mxDestroyArray(labelhandles__);
}
if (outH != NULL) {
mclCopyOutputArg(outH, outH__);
} else {
mxDestroyArray(outH__);
}
if (outM != NULL) {
mclCopyOutputArg(outM, outM__);
} else {
mxDestroyArray(outM__);
}
return mlfReturnValue(leghandle);
}
/*
* The function "mlfVLegend" contains the void interface for the "legend"
* M-function from file "d:\matlab6p5p1\toolbox\matlab\graph2d\legend.m" (lines
* 0-0). The void interface is only produced if the M-function uses the special
* variable "nargout", and has at least one output. The void interface function
* specifies zero output arguments to the implementation version of the
* function, and in the event that the implementation version still returns an
* output (which, in MATLAB, would be assigned to the "ans" variable), it
* deallocates the output. This function processes any input arguments and
* passes them to the implementation version of the function, appearing above.
*/
void mlfVLegend(mxArray * synthetic_varargin_argument, ...) {
mxArray * varargin = NULL;
mxArray * leghandle = NULL;
mxArray * labelhandles = NULL;
mxArray * outH = NULL;
mxArray * outM = NULL;
mlfVarargin(&varargin, synthetic_varargin_argument, 1);
mlfEnterNewContext(0, -1, varargin);
leghandle
= Mlegend(&labelhandles, &outH, &outM, 0, synthetic_varargin_argument);
mlfRestorePreviousContext(0, 0);
mxDestroyArray(varargin);
mxDestroyArray(leghandle);
mxDestroyArray(labelhandles);
mxDestroyArray(outH);
}
/*
* The function "mlxLegend" contains the feval interface for the "legend"
* M-function from file "d:\matlab6p5p1\toolbox\matlab\graph2d\legend.m" (lines
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -