📄 xlabel.cpp
字号:
//
// MATLAB Compiler: 3.0
// Date: Mon Jul 02 23:48:58 2007
// 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" "-M" "-silentsetup" "-d"
// "F:/转移/matlab/实用化工计算机模拟-Matlab在化学工程中的应用/Examples/Chapter
// 3/123/src" "-v" "-B" "cppsglcom:123,123,1.0" "-B" "csglcom:123,123,1.0" "-B"
// "sgl" "-m" "-W" "main" "-L" "C" "-t" "-T" "link:exe" "-h" "libmmfile.mlib"
// "-W" "mainhg" "libmwsglm.mlib" "-t" "-W" "comhg:123,123,1.0" "-T" "link:lib"
// "-h" "libmmfile.mlib" "-i" "-L" "cpp" "-g" "-G" "-A" "debugline:on" "-O"
// "none" "-O" "fold_scalar_mxarrays:off" "-O" "fold_non_scalar_mxarrays:off"
// "-O" "optimize_integer_for_loops:off" "-O" "array_indexing:off" "-O"
// "optimize_conditionals:off" "-O" "speculate:off" "-i"
// "D:/MATLAB6p5/work/xODE.m"
//
#include "xlabel.hpp"
#include "mwservices.h"
#include "libmatlbm.hpp"
#include "libmmfile.hpp"
void InitializeModule_xlabel() {
}
void TerminateModule_xlabel() {
}
static mwArray Mxlabel(int nargout_, mwArray string, mwArray varargin);
_mexLocalFunctionTable _local_function_table_xlabel
= { 0, (mexFunctionTableEntry *)NULL };
//
// The function "Nxlabel" contains the nargout interface for the "xlabel"
// M-function from file "d:\matlab6p5\toolbox\matlab\graph2d\xlabel.m" (lines
// 1-41). 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.
//
mwArray Nxlabel(int nargout, mwArray string, mwVarargin varargin) {
mwArray hh = mwArray::UNDEFINED;
hh = Mxlabel(nargout, string, varargin.ToArray());
return hh;
}
//
// The function "xlabel" contains the normal interface for the "xlabel"
// M-function from file "d:\matlab6p5\toolbox\matlab\graph2d\xlabel.m" (lines
// 1-41). This function processes any input arguments and passes them to the
// implementation version of the function, appearing above.
//
mwArray xlabel(mwArray string, mwVarargin varargin) {
int nargout = 1;
mwArray hh = mwArray::UNDEFINED;
hh = Mxlabel(nargout, string, varargin.ToArray());
return hh;
}
//
// The function "Vxlabel" contains the void interface for the "xlabel"
// M-function from file "d:\matlab6p5\toolbox\matlab\graph2d\xlabel.m" (lines
// 1-41). 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 Vxlabel(mwArray string, mwVarargin varargin) {
mwArray hh = mwArray::UNDEFINED;
hh = Mxlabel(0, string, varargin.ToArray());
}
//
// The function "mlxXlabel" contains the feval interface for the "xlabel"
// M-function from file "d:\matlab6p5\toolbox\matlab\graph2d\xlabel.m" (lines
// 1-41). The feval function calls the implementation version of xlabel through
// this function. This function processes any input arguments and passes them
// to the implementation version of the function, appearing above.
//
void mlxXlabel(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
MW_BEGIN_MLX();
{
mwArray mprhs[2];
mwArray mplhs[1];
int i;
mclCppUndefineArrays(1, mplhs);
if (nlhs > 1) {
error(
mwVarargin(
mwArray(
"Run-time Error: File: xlabel Line: 1 Column: 1"
" The function \"xlabel\" was called with more "
"than the declared number of outputs (1).")));
}
for (i = 0; i < 1 && i < nrhs; ++i) {
mprhs[i] = mwArray(prhs[i], 0);
}
for (; i < 1; ++i) {
mprhs[i].MakeDIN();
}
mprhs[1] = mclCreateVararginCell(nrhs - 1, prhs + 1);
mplhs[0] = Mxlabel(nlhs, mprhs[0], mprhs[1]);
plhs[0] = mplhs[0].FreezeData();
}
MW_END_MLX();
}
//
// The function "Mxlabel" is the implementation version of the "xlabel"
// M-function from file "d:\matlab6p5\toolbox\matlab\graph2d\xlabel.m" (lines
// 1-41). 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 hh = xlabel(string,varargin)
//
static mwArray Mxlabel(int nargout_, mwArray string, mwArray varargin) {
mclMlineEnterFunction(
"d:\\matlab6p5\\toolbox\\matlab\\graph2d\\xlabel.m", "xlabel")
mwLocalFunctionTable save_local_function_table_
= &_local_function_table_xlabel;
int nargin_ = nargin(-2, mwVarargin(string, varargin));
mwArray hh = mwArray::UNDEFINED;
mwArray h = mwArray::UNDEFINED;
mwArray ax = mwArray::UNDEFINED;
mwArray ans = mwArray::UNDEFINED;
//
// %XLABEL X-axis label.
// % XLABEL('text') adds text beside the X-axis on the current axis.
// %
// % XLABEL('text','Property1',PropertyValue1,'Property2',PropertyValue2,...)
// % sets the values of the specified properties of the xlabel.
// %
// % H = XLABEL(...) returns the handle to the text object used as the label.
// %
// % See also YLABEL, ZLABEL, TITLE, TEXT.
//
// % Copyright 1984-2002 The MathWorks, Inc.
// % $Revision: 5.13 $ $Date: 2002/04/08 21:44:38 $
//
// if nargin > 1 & (nargin-1)/2-fix((nargin-1)/2),
//
mclMline(15);
mwArray a_ = nargin_ > 1;
if (tobool(a_)
&& tobool(
a_
& svDoubleScalarRdivide((double) (nargin_ - 1), 2.0)
- fix(
mwArray(
svDoubleScalarRdivide((double) (nargin_ - 1), 2.0))))) {
//
// error('Incorrect number of input arguments')
//
mclMline(16);
error(mwVarargin(mwArray("Incorrect number of input arguments")));
} else {
}
//
// end
//
// ax = gca;
//
mclMline(19);
ax = gca(mwArray::DIN);
//
//
// %---Check for bypass option
// if isappdata(ax,'MWBYPASS_xlabel')
//
mclMline(22);
if (tobool(isappdata(mwVv(ax, "ax"), "MWBYPASS_xlabel"))) {
//
// h = mwbypass(ax,'MWBYPASS_xlabel',string,varargin{:});
//
mclMline(23);
h
= Ngraph2d_private_mwbypass(
1,
mwVv(ax, "ax"),
"MWBYPASS_xlabel",
mwVarargin(
mwVa(string, "string"),
mwVa(varargin, "varargin").cell(colon())));
//
//
// %---Standard behavior
// else
//
mclMline(26);
} else {
//
// h = get(ax,'xlabel');
//
mclMline(27);
h = Nget(1, mwVarargin(mwVv(ax, "ax"), "xlabel"));
//
//
// %Over-ride text objects default font attributes with
// %the Axes' default font attributes.
// set(h, 'FontAngle', get(ax, 'FontAngle'), ...
//
mclMline(31);
ans.EqAns(
Nset(
0,
mwVarargin(
mwVv(h, "h"),
"FontAngle",
Nget(1, mwVarargin(mwVv(ax, "ax"), "FontAngle")),
"FontName",
Nget(1, mwVarargin(mwVv(ax, "ax"), "FontName")),
"FontSize",
Nget(1, mwVarargin(mwVv(ax, "ax"), "FontSize")),
"FontWeight",
Nget(1, mwVarargin(mwVv(ax, "ax"), "FontWeight")),
"string",
mwVa(string, "string"),
mwVa(varargin, "varargin").cell(colon()))));
//
// 'FontName', get(ax, 'FontName'), ...
// 'FontSize', get(ax, 'FontSize'), ...
// 'FontWeight', get(ax, 'FontWeight'), ...
// 'string', string,varargin{:});
// end
//
mclMline(36);
}
//
//
// if nargout > 0
//
mclMline(38);
if (nargout_ > 0) {
//
// hh = h;
//
mclMline(39);
hh = mwVv(h, "h");
//
// end
//
mclMline(40);
}
mwValidateOutput(hh, 1, nargout_, "hh", "xlabel");
mclMlineFunctionReturn()
return hh;
mclMlineExitFunctionReturn();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -