📄 cla.c
字号:
/*
* MATLAB Compiler: 2.0.1
* Date: Tue May 08 21:28:21 2001
* Arguments: "-B" "sgl" "-m" "-W" "mainhg" "-L" "C" "asufit.m" "absfun.m"
* "absfunfree.m" "absfunshift.m" "absfunwidth.m" "dispfit.m" "dispfitdisp.m"
* "dispfitfree.m" "dispfitwidth.m" "seqmodfree.m" "spcfun.m" "spcfun1.m"
* "atamult.m" "aprecon.m"
*/
#include "cla.h"
#include "graphics_private_clo.h"
/*
* The function "Mcla" is the implementation version of the "cla" M-function
* from file "C:\MATLABR11\toolbox\matlab\graphics\cla.m" (lines 1-22). It
* contains the actual compiled code for that M-function. It is a static
* function and must only be called from one of the interface functions,
* appearing below.
*/
/*
* function ret_ax = cla(varargin)
*/
static mxArray * Mcla(int nargout_, mxArray * varargin) {
mxArray * ret_ax = mclGetUninitializedArray();
mxArray * ans = mclInitializeAns();
mxArray * nargout = mclInitialize(mlfScalar(nargout_));
/*
* %CLA Clear current axis.
* % CLA deletes all children of the current axes with visible handles.
* %
* % CLA RESET deletes all objects (including ones with hidden handles)
* % and also resets all axes properties, except Position and Units, to
* % their default values.
* %
* % See also CLF, RESET, HOLD.
*
* % CLA(..., HSAVE) deletes all children except those specified in
* % HSAVE.
* %
* % Copyright (c) 1984-98 by The MathWorks, Inc.
* % $Revision: 5.12 $ $Date: 1998/06/29 14:56:08 $
*
* clo(gca, varargin{:});
*/
mclAssignAns(
&ans,
mlfFeval(
mclAnsVarargout(),
mlxGraphics_private_clo,
mlfGca(NULL),
mlfIndexRef(varargin, "{?}", mlfCreateColonIndex()),
NULL));
/*
*
* if (nargout ~= 0)
*/
if (mlfTobool(mlfNe(nargout, mlfScalar(0.0)))) {
/*
* ret_ax = gca;
*/
mlfAssign(&ret_ax, mlfGca(NULL));
/*
* end
*/
}
mclValidateOutputs("cla", 1, nargout_, &ret_ax);
mxDestroyArray(ans);
mxDestroyArray(nargout);
return ret_ax;
}
/*
* The function "mlfNCla" contains the nargout interface for the "cla"
* M-function from file "C:\MATLABR11\toolbox\matlab\graphics\cla.m" (lines
* 1-22). 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 * mlfNCla(int nargout, ...) {
mxArray * varargin = mclUnassigned();
mxArray * ret_ax = mclGetUninitializedArray();
mlfVarargin(&varargin, nargout, 0);
mlfEnterNewContext(0, -1, varargin);
ret_ax = Mcla(nargout, varargin);
mlfRestorePreviousContext(0, 0);
mxDestroyArray(varargin);
return mlfReturnValue(ret_ax);
}
/*
* The function "mlfCla" contains the normal interface for the "cla" M-function
* from file "C:\MATLABR11\toolbox\matlab\graphics\cla.m" (lines 1-22). This
* function processes any input arguments and passes them to the implementation
* version of the function, appearing above.
*/
mxArray * mlfCla(mxArray * synthetic_varargin_argument, ...) {
mxArray * varargin = mclUnassigned();
int nargout = 1;
mxArray * ret_ax = mclGetUninitializedArray();
mlfVarargin(&varargin, synthetic_varargin_argument, 1);
mlfEnterNewContext(0, -1, varargin);
ret_ax = Mcla(nargout, varargin);
mlfRestorePreviousContext(0, 0);
mxDestroyArray(varargin);
return mlfReturnValue(ret_ax);
}
/*
* The function "mlfVCla" contains the void interface for the "cla" M-function
* from file "C:\MATLABR11\toolbox\matlab\graphics\cla.m" (lines 1-22). 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 mlfVCla(mxArray * synthetic_varargin_argument, ...) {
mxArray * varargin = mclUnassigned();
mxArray * ret_ax = mclUnassigned();
mlfVarargin(&varargin, synthetic_varargin_argument, 1);
mlfEnterNewContext(0, -1, varargin);
ret_ax = Mcla(0, synthetic_varargin_argument);
mlfRestorePreviousContext(0, 0);
mxDestroyArray(varargin);
}
/*
* The function "mlxCla" contains the feval interface for the "cla" M-function
* from file "C:\MATLABR11\toolbox\matlab\graphics\cla.m" (lines 1-22). The
* feval function calls the implementation version of cla through this
* function. This function processes any input arguments and passes them to the
* implementation version of the function, appearing above.
*/
void mlxCla(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
mxArray * mprhs[1];
mxArray * mplhs[1];
int i;
if (nlhs > 1) {
mlfError(
mxCreateString(
"Run-time Error: File: cla Line: 1 Column: 0 The function \"cla\""
" was called with more than the declared number of outputs (1)"));
}
for (i = 0; i < 1; ++i) {
mplhs[i] = NULL;
}
mlfEnterNewContext(0, 0);
mprhs[0] = NULL;
mlfAssign(&mprhs[0], mclCreateVararginCell(nrhs, prhs));
mplhs[0] = Mcla(nlhs, mprhs[0]);
mlfRestorePreviousContext(0, 0);
plhs[0] = mplhs[0];
mxDestroyArray(mprhs[0]);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -