?? subplot.cpp
字號:
//
// MATLAB Compiler: 2.1
// Date: Fri Oct 26 10:24:04 2001
// 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" "-B" "sglcpp" "-p" "-W"
// "main" "-L" "Cpp" "-t" "-T" "link:exe" "-h" "libmmfile.mlib" "-W" "mainhg"
// "libmwsglm.mlib" "sgltest1"
//
#include "subplot.hpp"
#include "libmatlbm.hpp"
#include "libmmfile.hpp"
#include "libmwsglm.hpp"
static mxChar _array1_[132] = { 'R', 'u', 'n', '-', 't', 'i', 'm', 'e', ' ',
'E', 'r', 'r', 'o', 'r', ':', ' ', 'F', 'i',
'l', 'e', ':', ' ', 's', 'u', 'b', 'p', 'l',
'o', 't', ' ', 'L', 'i', 'n', 'e', ':', ' ',
'1', ' ', 'C', 'o', 'l', 'u', 'm', 'n', ':',
' ', '1', ' ', 'T', 'h', 'e', ' ', 'f', 'u',
'n', 'c', 't', 'i', 'o', 'n', ' ', '"', 's',
'u', 'b', 'p', 'l', 'o', 't', '"', ' ', 'w',
'a', 's', ' ', 'c', 'a', 'l', 'l', 'e', 'd',
' ', 'w', 'i', 't', 'h', ' ', 'm', 'o', 'r',
'e', ' ', 't', 'h', 'a', 'n', ' ', 't', 'h',
'e', ' ', 'd', 'e', 'c', 'l', 'a', 'r', 'e',
'd', ' ', 'n', 'u', 'm', 'b', 'e', 'r', ' ',
'o', 'f', ' ', 'o', 'u', 't', 'p', 'u', 't',
's', ' ', '(', '1', ')', '.' };
static mwArray _mxarray0_ = mclInitializeString(132, _array1_);
static mxChar _array3_[131] = { 'R', 'u', 'n', '-', 't', 'i', 'm', 'e', ' ',
'E', 'r', 'r', 'o', 'r', ':', ' ', 'F', 'i',
'l', 'e', ':', ' ', 's', 'u', 'b', 'p', 'l',
'o', 't', ' ', 'L', 'i', 'n', 'e', ':', ' ',
'1', ' ', 'C', 'o', 'l', 'u', 'm', 'n', ':',
' ', '1', ' ', 'T', 'h', 'e', ' ', 'f', 'u',
'n', 'c', 't', 'i', 'o', 'n', ' ', '"', 's',
'u', 'b', 'p', 'l', 'o', 't', '"', ' ', 'w',
'a', 's', ' ', 'c', 'a', 'l', 'l', 'e', 'd',
' ', 'w', 'i', 't', 'h', ' ', 'm', 'o', 'r',
'e', ' ', 't', 'h', 'a', 'n', ' ', 't', 'h',
'e', ' ', 'd', 'e', 'c', 'l', 'a', 'r', 'e',
'd', ' ', 'n', 'u', 'm', 'b', 'e', 'r', ' ',
'o', 'f', ' ', 'i', 'n', 'p', 'u', 't', 's',
' ', '(', '3', ')', '.' };
static mwArray _mxarray2_ = mclInitializeString(131, _array3_);
static mwArray _mxarray4_ = mclInitializeDouble(0.0);
static mwArray _mxarray5_ = mclInitializeDouble(1.0);
static mwArray _mxarray6_ = mclInitializeDouble(2.220446049250313e-16);
static mwArray _mxarray7_ = mclInitializeDouble(111.0);
static mwArray _mxarray8_ = mclInitializeCharVector(0, 0, (mxChar *)NULL);
static mxChar _array10_[4] = { 't', 'y', 'p', 'e' };
static mwArray _mxarray9_ = mclInitializeString(4, _array10_);
static mxChar _array12_[4] = { 'a', 'x', 'e', 's' };
static mwArray _mxarray11_ = mclInitializeString(4, _array12_);
static mxChar _array14_[37] = { 'R', 'e', 'q', 'u', 'i', 'r', 'e', 's',
' ', 'v', 'a', 'l', 'i', 'd', ' ', 'a',
'x', 'e', 's', ' ', 'h', 'a', 'n', 'd',
'l', 'e', ' ', 'f', 'o', 'r', ' ', 'i',
'n', 'p', 'u', 't', '.' };
static mwArray _mxarray13_ = mclInitializeString(37, _array14_);
static mwArray _mxarray15_ = mclInitializeDouble(10.0);
static mwArray _mxarray16_ = mclInitializeDouble(100.0);
static mxChar _array18_[33] = { 'I', 'n', 'd', 'e', 'x', ' ', 'e', 'x', 'c',
'e', 'e', 'd', 's', ' ', 'n', 'u', 'm', 'b',
'e', 'r', ' ', 'o', 'f', ' ', 's', 'u', 'b',
'p', 'l', 'o', 't', 's', '.' };
static mwArray _mxarray17_ = mclInitializeString(33, _array18_);
static mwArray _mxarray19_ = mclInitializeDouble(2.0);
static mxChar _array21_[8] = { 'p', 'o', 's', 'i', 't', 'i', 'o', 'n' };
static mwArray _mxarray20_ = mclInitializeString(8, _array21_);
static mwArray _mxarray22_ = mclInitializeDouble(4.0);
static mxChar _array24_[61] = { 's', 'u', 'b', 'p', 'l', 'o', 't', '(', 0x0027,
'p', 'o', 's', 'i', 't', 'i', 'o', 'n', 0x0027,
',', ' ', '[', 'l', 'e', 'f', 't', ' ', 'b',
'o', 't', 't', 'o', 'm', ' ', 'w', 'i', 'd',
't', 'h', ' ', 'h', 'e', 'i', 'g', 'h', 't',
']', ')', ' ', 'i', 's', ' ', 'w', 'h', 'a',
't', ' ', 'w', 'o', 'r', 'k', 's' };
static mwArray _mxarray23_ = mclInitializeString(61, _array24_);
static mxChar _array26_[22] = { 'U', 'n', 'k', 'n', 'o', 'w', 'n', ' ',
'c', 'o', 'm', 'm', 'a', 'n', 'd', ' ',
'o', 'p', 't', 'i', 'o', 'n' };
static mwArray _mxarray25_ = mclInitializeString(22, _array26_);
static mwArray _mxarray27_ = mclInitializeDouble(3.0);
static mxChar _array29_[13] = { 'C', 'u', 'r', 'r', 'e', 'n', 't',
'F', 'i', 'g', 'u', 'r', 'e' };
static mwArray _mxarray28_ = mclInitializeString(13, _array29_);
static mxChar _array31_[11] = { 'C', 'u', 'r', 'r', 'e', 'n',
't', 'A', 'x', 'e', 's' };
static mwArray _mxarray30_ = mclInitializeString(11, _array31_);
static mxChar _array33_[20] = { 'I', 'l', 'l', 'e', 'g', 'a', 'l',
' ', 'p', 'l', 'o', 't', ' ', 'n',
'u', 'm', 'b', 'e', 'r', '.' };
static mwArray _mxarray32_ = mclInitializeString(20, _array33_);
static mwArray _mxarray34_ = mclInitializeDouble(.18);
static mwArray _mxarray35_ = mclInitializeDouble(.09);
static mwArray _mxarray36_ = mclInitializeDouble(.9);
static mxChar _array38_[16] = { 'd', 'e', 'f', 'a', 'u', 'l', 't', 'a',
'x', 'e', 's', 'u', 'n', 'i', 't', 's' };
static mwArray _mxarray37_ = mclInitializeString(16, _array38_);
static mxChar _array40_[10] = { 'n', 'o', 'r', 'm', 'a',
'l', 'i', 'z', 'e', 'd' };
static mwArray _mxarray39_ = mclInitializeString(10, _array40_);
static mxChar _array42_[32] = { 'D', 'e', 'f', 'a', 'u', 'l', 't', 'A',
'x', 'e', 's', 'U', 'n', 'i', 't', 's',
' ', 'n', 'o', 't', ' ', 'n', 'o', 'r',
'm', 'a', 'l', 'i', 'z', 'e', 'd', '.' };
static mwArray _mxarray41_ = mclInitializeString(32, _array42_);
static mxChar _array44_[5] = { 'u', 'n', 'i', 't', 's' };
static mwArray _mxarray43_ = mclInitializeString(5, _array44_);
static mxChar _array46_[19] = { 'D', 'e', 'f', 'a', 'u', 'l', 't',
'A', 'x', 'e', 's', 'P', 'o', 's',
'i', 't', 'i', 'o', 'n' };
static mwArray _mxarray45_ = mclInitializeString(19, _array46_);
static mwArray _mxarray47_ = mclInitializeDouble(.5);
static mwArray _mxarray48_ = mclInitializeDouble(.7);
static mxChar _array50_[8] = { 'n', 'e', 'x', 't', 'p', 'l', 'o', 't' };
static mwArray _mxarray49_ = mclInitializeString(8, _array50_);
static mxChar _array52_[7] = { 'r', 'e', 'p', 'l', 'a', 'c', 'e' };
static mwArray _mxarray51_ = mclInitializeString(7, _array52_);
static mwArray _mxarray53_ = mclInitializeDouble(7.0);
static mxChar _array55_[3] = { 'a', 'd', 'd' };
static mwArray _mxarray54_ = mclInitializeString(3, _array55_);
static mxChar _array57_[46] = { 'F', 'u', 'n', 'c', 't', 'i', 'o', 'n',
' ', 'c', 'a', 'l', 'l', 'e', 'd', ' ',
'w', 'i', 't', 'h', ' ', 't', 'o', 'o',
' ', 'm', 'a', 'n', 'y', ' ', 'o', 'u',
't', 'p', 'u', 't', ' ', 'a', 'r', 'g',
'u', 'm', 'e', 'n', 't', 's' };
static mwArray _mxarray56_ = mclInitializeString(46, _array57_);
static mxChar _array59_[8] = { 'N', 'e', 'x', 't', 'P', 'l', 'o', 't' };
static mwArray _mxarray58_ = mclInitializeString(8, _array59_);
static mwArray _mxarray60_ = mclInitializeDoubleVector(0, 0, (double *)NULL);
static mxChar _array62_[4] = { 'T', 'y', 'p', 'e' };
static mwArray _mxarray61_ = mclInitializeString(4, _array62_);
static mxChar _array64_[5] = { 'U', 'n', 'i', 't', 's' };
static mwArray _mxarray63_ = mclInitializeString(5, _array64_);
static mxChar _array66_[8] = { 'P', 'o', 's', 'i', 't', 'i', 'o', 'n' };
static mwArray _mxarray65_ = mclInitializeString(8, _array66_);
static mxChar _array68_[3] = { 'n', 'e', 'w' };
static mwArray _mxarray67_ = mclInitializeString(3, _array68_);
static mxChar _array70_[6] = { 'n', 'o', 'r', 'm', 'a', 'l' };
static mwArray _mxarray69_ = mclInitializeString(6, _array70_);
void InitializeModule_subplot() {
}
void TerminateModule_subplot() {
}
static mwArray Msubplot(int nargout_,
mwArray nrows,
mwArray ncols,
mwArray thisPlot);
_mexLocalFunctionTable _local_function_table_subplot
= { 0, (mexFunctionTableEntry *)NULL };
//
// The function "Nsubplot" contains the nargout interface for the "subplot"
// M-function from file "C:\MATLAB\toolbox\matlab\graph2d\subplot.m" (lines
// 1-234). 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 Nsubplot(int nargout, mwArray nrows, mwArray ncols, mwArray thisPlot) {
mwArray theAxis(mclGetUninitializedArray());
theAxis = Msubplot(nargout, nrows, ncols, thisPlot);
return theAxis;
}
//
// The function "subplot" contains the normal interface for the "subplot"
// M-function from file "C:\MATLAB\toolbox\matlab\graph2d\subplot.m" (lines
// 1-234). This function processes any input arguments and passes them to the
// implementation version of the function, appearing above.
//
mwArray subplot(mwArray nrows, mwArray ncols, mwArray thisPlot) {
int nargout(1);
mwArray theAxis(mclGetUninitializedArray());
theAxis = Msubplot(nargout, nrows, ncols, thisPlot);
return theAxis;
}
//
// The function "Vsubplot" contains the void interface for the "subplot"
// M-function from file "C:\MATLAB\toolbox\matlab\graph2d\subplot.m" (lines
// 1-234). 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 Vsubplot(mwArray nrows, mwArray ncols, mwArray thisPlot) {
mwArray theAxis(mwArray::UNDEFINED);
theAxis = Msubplot(0, nrows, ncols, thisPlot);
}
//
// The function "mlxSubplot" contains the feval interface for the "subplot"
// M-function from file "C:\MATLAB\toolbox\matlab\graph2d\subplot.m" (lines
// 1-234). The feval function calls the implementation version of subplot
// through this function. This function processes any input arguments and
// passes them to the implementation version of the function, appearing above.
//
void mlxSubplot(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
MW_BEGIN_MLX();
{
mwArray mprhs[3];
mwArray mplhs[1];
int i;
mclCppUninitializeArrays(1, mplhs);
if (nlhs > 1) {
error(_mxarray0_);
}
if (nrhs > 3) {
error(_mxarray2_);
}
for (i = 0; i < 3 && i < nrhs; ++i) {
mprhs[i] = mwArray(prhs[i], 0);
}
for (; i < 3; ++i) {
mprhs[i].MakeDIN();
}
mplhs[0] = Msubplot(nlhs, mprhs[0], mprhs[1], mprhs[2]);
plhs[0] = mplhs[0].FreezeData();
}
MW_END_MLX();
}
//
// The function "Msubplot" is the implementation version of the "subplot"
// M-function from file "C:\MATLAB\toolbox\matlab\graph2d\subplot.m" (lines
// 1-234). 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 theAxis = subplot(nrows, ncols, thisPlot)
//
static mwArray Msubplot(int nargout_,
mwArray nrows,
mwArray ncols,
mwArray thisPlot) {
mwLocalFunctionTable save_local_function_table_(&_local_function_table_subplot);
int nargin_(nargin(3, mwVarargin(nrows, ncols, thisPlot)));
mwArray theAxis(mclGetUninitializedArray());
mwArray ax(mclGetUninitializedArray());
mwArray intersect(mclGetUninitializedArray());
mwArray sibpos(mclGetUninitializedArray());
mwArray units(mclGetUninitializedArray());
mwArray i(mclGetUninitializedArray());
mwArray got_one(mclGetUninitializedArray());
mwArray sibs(mclGetUninitializedArray());
mwArray nextstate(mclGetUninitializedArray());
mwArray height(mclGetUninitializedArray());
mwArray width(mclGetUninitializedArray());
mwArray totalheight(mclGetUninitializedArray());
mwArray totalwidth(mclGetUninitializedArray());
mwArray row_offset(mclGetUninitializedArray());
mwArray col_offset(mclGetUninitializedArray());
mwArray def_pos(mclGetUninitializedArray());
mwArray tmp(mclGetUninitializedArray());
mwArray col(mclGetUninitializedArray());
mwArray row(mclGetUninitializedArray());
mwArray PERC_OFFSET_T(mclGetUninitializedArray());
mwArray PERC_OFFSET_B(mclGetUninitializedArray());
mwArray PERC_OFFSET_R(mclGetUninitializedArray());
mwArray PERC_OFFSET_L(mclGetUninitializedArray());
mwArray pos_size(mclGetUninitializedArray());
mwArray ans(mclGetUninitializedArray());
mwArray code(mclGetUninitializedArray());
mwArray position(mclGetUninitializedArray());
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -