📄 optim_private_display1.c
字号:
NULL));
/*
* clk(2:3),clk(1),clk(4:5),floor(clk(6))) ;
* fprintf(logfile,'***********************************************************') ;
*/
mclAssignAns(
&ans,
mlfFprintf(
logfile,
mxCreateString(
"***********************************************************"),
NULL));
/*
* fprintf(logfile,'\n************************LSOT BEGINS************************') ;
*/
mclAssignAns(
&ans,
mlfFprintf(
logfile,
mxCreateString(
"\\n************************LSOT BEGINS************************"),
NULL));
/*
* fprintf(logfile,'\n***********************************************************\n') ;
*/
mclAssignAns(
&ans,
mlfFprintf(
logfile,
mxCreateString(
"\\n*******************************"
"****************************\\n"),
NULL));
/*
* fprintf(logfile,[ParamTitl';10*ones(1,size(ParamTitl,1))]) ;
*/
mclAssignAns(
&ans,
mlfFprintf(
logfile,
mlfVertcat(
mlfHorzcat(mlfCtranspose(ParamTitl), NULL),
mlfHorzcat(
mlfMtimes(
mlfScalar(10.0),
mlfOnes(
mlfScalar(1.0),
mlfSize(mclValueVarargout(), ParamTitl, mlfScalar(1.0)),
NULL)),
NULL),
NULL),
NULL));
/*
* fclose(logfile) ;
*/
mclAssignAns(&ans, mlfFclose(logfile));
/*
* end
*/
}
/*
* drawnow ;
*/
mlfDrawnow(NULL);
mclValidateOutputs("display1/displayInit", 1, nargout_, &figtr);
mxDestroyArray(ParamTitl);
mxDestroyArray(ParamTitlHdln);
mxDestroyArray(ans);
mxDestroyArray(axx);
mxDestroyArray(clk);
mxDestroyArray(logfile);
mxDestroyArray(n);
mxDestroyArray(screensize);
mxDestroyArray(xpos);
mxDestroyArray(ypos);
/*
*
*
* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*
*/
return figtr;
}
/*
* The function "mlfDisplay1_displayInit" contains the normal interface for the
* "display1/displayInit" M-function from file
* "C:\MATLABR11\toolbox\optim\private\display1.m" (lines 98-280). This
* function processes any input arguments and passes them to the implementation
* version of the function, appearing above.
*/
static mxArray * mlfDisplay1_displayInit(mxArray * itbnd,
mxArray * tol,
mxArray * showstat,
mxArray * nbnds,
mxArray * x,
mxArray * g,
mxArray * l,
mxArray * u) {
int nargout = 1;
mxArray * figtr = mclGetUninitializedArray();
mlfEnterNewContext(0, 8, itbnd, tol, showstat, nbnds, x, g, l, u);
figtr
= Mdisplay1_displayInit(
nargout, itbnd, tol, showstat, nbnds, x, g, l, u);
mlfRestorePreviousContext(0, 8, itbnd, tol, showstat, nbnds, x, g, l, u);
return mlfReturnValue(figtr);
}
/*
* The function "mlxDisplay1_displayInit" contains the feval interface for the
* "display1/displayInit" M-function from file
* "C:\MATLABR11\toolbox\optim\private\display1.m" (lines 98-280). The feval
* function calls the implementation version of display1/displayInit through
* this function. This function processes any input arguments and passes them
* to the implementation version of the function, appearing above.
*/
static void mlxDisplay1_displayInit(int nlhs,
mxArray * plhs[],
int nrhs,
mxArray * prhs[]) {
mxArray * mprhs[8];
mxArray * mplhs[1];
int i;
if (nlhs > 1) {
mlfError(
mxCreateString(
"Run-time Error: File: display1/displayInit Line: 98 Col"
"umn: 0 The function \"display1/displayInit\" was called"
" with more than the declared number of outputs (1)"));
}
if (nrhs > 8) {
mlfError(
mxCreateString(
"Run-time Error: File: display1/displayInit Line: 98 Co"
"lumn: 0 The function \"display1/displayInit\" was call"
"ed with more than the declared number of inputs (8)"));
}
for (i = 0; i < 1; ++i) {
mplhs[i] = NULL;
}
for (i = 0; i < 8 && i < nrhs; ++i) {
mprhs[i] = prhs[i];
}
for (; i < 8; ++i) {
mprhs[i] = NULL;
}
mlfEnterNewContext(
0,
8,
mprhs[0],
mprhs[1],
mprhs[2],
mprhs[3],
mprhs[4],
mprhs[5],
mprhs[6],
mprhs[7]);
mplhs[0]
= Mdisplay1_displayInit(
nlhs,
mprhs[0],
mprhs[1],
mprhs[2],
mprhs[3],
mprhs[4],
mprhs[5],
mprhs[6],
mprhs[7]);
mlfRestorePreviousContext(
0,
8,
mprhs[0],
mprhs[1],
mprhs[2],
mprhs[3],
mprhs[4],
mprhs[5],
mprhs[6],
mprhs[7]);
plhs[0] = mplhs[0];
}
/*
* The function "Mdisplay1_displayFinal" is the implementation version of the
* "display1/displayFinal" M-function from file
* "C:\MATLABR11\toolbox\optim\private\display1.m" (lines 280-323). 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 displayFinal(figtr,figps)
*/
static void Mdisplay1_displayFinal(mxArray * figtr, mxArray * figps) {
mxArray * ans = mclInitializeAns();
mxArray * callbackstr = mclGetUninitializedArray();
mxArray * logfile = mclGetUninitializedArray();
mxArray * nargin_ = mclGetUninitializedArray();
mlfAssign(&nargin_, mlfNargin(0, figtr, figps, NULL));
mclValidateInputs("display1/displayFinal", 2, &figtr, &figps);
mclCopyArray(&figtr);
mclCopyArray(&figps);
/*
* %DISPLAYFINAL Final output and cleanup.
* %
* % DISPLAYFINAL(figtr,figps) displays end-of-the-line notification.
* %
*
*
* if nargin < 2, figps = [] ;
*/
if (mlfTobool(mlfLt(nargin_, mlfScalar(2.0)))) {
mlfAssign(&figps, mclCreateEmptyArray());
/*
* end ;
*/
}
/*
*
* figtr = findobj('type','figure','Name','Progress Information') ;
*/
mlfAssign(
&figtr,
mlfFindobj(
mxCreateString("type"),
mxCreateString("figure"),
mxCreateString("Name"),
mxCreateString("Progress Information"),
NULL));
/*
*
* if ~isempty(figtr)
*/
if (mlfTobool(mlfNot(mlfIsempty(figtr)))) {
/*
* set(findobj(figtr,'Userdata','lsotlabel'),'String','DONE') ;
*/
mclAssignAns(
&ans,
mlfNSet(
0,
mlfFindobj(
figtr,
mxCreateString("Userdata"),
mxCreateString("lsotlabel"),
NULL),
mxCreateString("String"),
mxCreateString("DONE"),
NULL));
/*
*
* callbackstr = ['figtr = findobj(''type'',''figure'',',...
*/
mlfAssign(
&callbackstr,
mlfHorzcat(
mxCreateString("figtr = findobj('type','figure',"),
mxCreateString("'Name','Algorithm Performance Statistics') ;"),
mxCreateString("figps = findobj('type','figure',"),
mxCreateString("'Name', 'Progress Information') ;"),
mxCreateString("close([figtr, figps])"),
NULL));
/*
* '''Name'',''Algorithm Performance Statistics'') ;', ...
* 'figps = findobj(''type'',''figure'',',...
* '''Name'', ''Progress Information'') ;', ...
* 'close([figtr, figps])'] ;
*
* set(findobj(figtr,'Userdata','stop button'),...
*/
mclAssignAns(
&ans,
mlfNSet(
0,
mlfFindobj(
figtr,
mxCreateString("Userdata"),
mxCreateString("stop button"),
NULL),
mxCreateString("String"),
mxCreateString("Close optimization windows"),
mxCreateString("Callback"),
callbackstr,
NULL));
/*
* 'String','Close optimization windows',...
* 'Callback',callbackstr) ;
*
* end ;
*/
}
/*
*
* % disable this feature
* if 0
*/
if (mlfTobool(mlfScalar(0.0))) {
/*
* logfile = fopen('lsot.log','at') ;
*/
mlfAssign(
&logfile,
mlfFopen(
NULL,
NULL,
mxCreateString("lsot.log"),
mxCreateString("at"),
NULL));
/*
* fprintf(logfile,'\n***********************************************************\n') ;
*/
mclAssignAns(
&ans,
mlfFprintf(
logfile,
mxCreateString(
"\\n*******************************"
"****************************\\n"),
NULL));
/*
* fprintf(logfile,'*************************LSOT ENDS*************************\n') ;
*/
mclAssignAns(
&ans,
mlfFprintf(
logfile,
mxCreateString(
"*************************LSOT ENDS*************************\\n"),
NULL));
/*
* fprintf(logfile,'***********************************************************') ;
*/
mclAssignAns(
&ans,
mlfFprintf(
logfile,
mxCreateString(
"***********************************************************"),
NULL));
/*
* end
*/
}
mxDestroyArray(ans);
mxDestroyArray(callbackstr);
mxDestroyArray(figps);
mxDestroyArray(figtr);
mxDestroyArray(logfile);
mxDestroyArray(nargin_);
/*
*
* %['figtr = findobj(''type'',''figure'',''Name'', ''Algorithm Performance Statistics'') ;', ...
* % 'figps = findobj(''type'',''figure'',''Name'', ''Progress Information'') ;', ...
* % 'close([figtr, figps])']);
*
*
*
*
* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
}
/*
* The function "mlfDisplay1_displayFinal" contains the normal interface for
* the "display1/displayFinal" M-function from file
* "C:\MATLABR11\toolbox\optim\private\display1.m" (lines 280-323). This
* function processes any input arguments and passes them to the implementation
* version of the function, appearing above.
*/
static void mlfDisplay1_displayFinal(mxArray * figtr, mxArray * figps) {
mlfEnterNewContext(0, 2, figtr, figps);
Mdisplay1_displayFinal(figtr, figps);
mlfRestorePreviousContext(0, 2, figtr, figps);
}
/*
* The function "mlxDisplay1_displayFinal" contains the feval interface for the
* "display1/displayFinal" M-function from file
* "C:\MATLABR11\toolbox\optim\private\display1.m" (lines 280-323). The feval
* function calls the implementation version of display1/displayFinal through
* this function. This function processes any input arguments and passes them
* to the implementation version of the function, appearing above.
*/
static void mlxDisplay1_displayFinal(int nlhs,
mxArray * plhs[],
int nrhs,
mxArray * prhs[]) {
mxArray * mprhs[2];
int i;
if (nlhs > 0) {
mlfError(
mxCreateString(
"Run-time Error: File: display1/displayFinal Line: 280 Co"
"lumn: 0 The function \"display1/displayFinal\" was calle"
"d with more than the declared number of outputs (0)"));
}
if (nrhs > 2) {
mlfError(
mxCreateString(
"Run-time Error: File: display1/displayFinal Line: 280 C"
"olumn: 0 The function \"display1/displayFinal\" was cal"
"led with more than the declared n
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -