📄 c6ftest.c
字号:
/*
* MATLAB Compiler: 2.0.1
* Date: Fri May 05 20:39:01 2000
* Arguments: "-x" "-B" "sgl" "-m" "-W" "mainhg" "-L" "C" "c6ftest"
*/
#include "c6ftest.h"
static double __Array0_r[3] = { 0.8, 0.8, 0.8 };
static double __Array1_r[4] = { 18.0, 180.0, 576.0, 432.0 };
static double __Array2_r[4] = { 261.0, 335.0, 433.0, 108.0 };
static double __Array3_r[3]
= { 0.752941176470588, 0.752941176470588, 0.752941176470588 };
static double __Array4_r[4] = { 15.0, 43.75, 256.5, 21.75 };
static double __Array5_r[4] = { 15.0, 12.0, 256.5, 21.75 };
/*
* The function "Mc6ftest" is the implementation version of the "c6ftest"
* M-function from file
* "C:\Xue.Dy\BOOKS\MATLAB\mat5progs\mat5files\chap6\c6ftest.m" (lines 1-54).
* 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 fig = c6ftest()
*/
static mxArray * Mc6ftest(int nargout_) {
mxArray * fig = mclGetUninitializedArray();
mxArray * h0 = mclGetUninitializedArray();
mxArray * h1 = mclGetUninitializedArray();
mxArray * h2 = mclGetUninitializedArray();
mxArray * mat0 = mclUnassigned();
mxArray * nargout = mclInitialize(mlfScalar(nargout_));
/*
* % This is the machine-generated representation of a Handle Graphics object
* % and its children. Note that handle values may change when these objects
* % are re-created. This may cause problems with any callbacks written to
* % depend on the value of the handle at the time the object was saved.
* % This problem is solved by saving the output as a FIG-file.
* %
* % To reopen this object, just type the name of the M-file at the MATLAB
* % prompt. The M-file and its associated MAT-file must be on your path.
* %
* % NOTE: certain newer features in MATLAB may not have been saved in this
* % M-file due to limitations of this format, which has been superseded by
* % FIG-files. Figures which have been annotated using the plot editor tools
* % are incompatible with the M-file/MAT-file format, and should be saved as
* % FIG-files.
*
* load c6ftest
*/
mclLoadConditional(
mxCreateString("c6ftest"),
"fig",
&fig,
"h0",
&h0,
"h1",
&h1,
"h2",
&h2,
"mat0",
&mat0,
NULL);
/*
*
* h0 = figure('Color',[0.8 0.8 0.8], ...
*/
mlfAssign(
&h0,
mlfNFigure(
1,
mxCreateString("Color"),
mlfDoubleMatrix(1, 3, __Array0_r, NULL),
mxCreateString("Colormap"),
mat0,
mxCreateString("FileName"),
mxCreateString("C:\\matlabr11\\work\\c6ftest.m"),
mxCreateString("PaperPosition"),
mlfDoubleMatrix(1, 4, __Array1_r, NULL),
mxCreateString("PaperUnits"),
mxCreateString("points"),
mxCreateString("Position"),
mlfDoubleMatrix(1, 4, __Array2_r, NULL),
mxCreateString("Tag"),
mxCreateString("Fig1"),
mxCreateString("ToolBar"),
mxCreateString("none"),
NULL));
/*
* 'Colormap',mat0, ...
* 'FileName','C:\matlabr11\work\c6ftest.m', ...
* 'PaperPosition',[18 180 576 432], ...
* 'PaperUnits','points', ...
* 'Position',[261 335 433 108], ...
* 'Tag','Fig1', ...
* 'ToolBar','none');
* h1 = uimenu('Parent',h0, ...
*/
mlfAssign(
&h1,
mlfNUimenu(
1,
mxCreateString("Parent"),
h0,
mxCreateString("Label"),
mxCreateString("New Tools"),
mxCreateString("Tag"),
mxCreateString("mnuNewTool"),
NULL));
/*
* 'Label','New Tools', ...
* 'Tag','mnuNewTool');
* h2 = uimenu('Parent',h1, ...
*/
mlfAssign(
&h2,
mlfNUimenu(
1,
mxCreateString("Parent"),
h1,
mxCreateString("Callback"),
mxCreateString("close(gcf)"),
mxCreateString("Label"),
mxCreateString("Close Current Window"),
mxCreateString("Tag"),
mxCreateString("&HelpSubuimenu1"),
NULL));
/*
* 'Callback','close(gcf)', ...
* 'Label','Close Current Window', ...
* 'Tag','&HelpSubuimenu1');
* h2 = uimenu('Parent',h1, ...
*/
mlfAssign(
&h2,
mlfNUimenu(
1,
mxCreateString("Parent"),
h1,
mxCreateString("Callback"),
mxCreateString("set(gcf,'Color',[1,0,0])"),
mxCreateString("Label"),
mxCreateString("Set Windows to Red"),
mxCreateString("Tag"),
mxCreateString("mnuSetRed"),
NULL));
/*
* 'Callback','set(gcf,''Color'',[1,0,0])', ...
* 'Label','Set Windows to Red', ...
* 'Tag','mnuSetRed');
* h1 = uicontrol('Parent',h0, ...
*/
mlfAssign(
&h1,
mlfNUicontrol(
1,
mxCreateString("Parent"),
h0,
mxCreateString("Units"),
mxCreateString("points"),
mxCreateString("BackgroundColor"),
mlfDoubleMatrix(1, 3, __Array3_r, NULL),
mxCreateString("Callback"),
mxCreateString("close(gcf);"),
mxCreateString("ListboxTop"),
mlfScalar(0.0),
mxCreateString("Position"),
mlfDoubleMatrix(1, 4, __Array4_r, NULL),
mxCreateString("String"),
mxCreateString("Close Current Window"),
mxCreateString("Tag"),
mxCreateString("Pushbutton1"),
NULL));
/*
* 'Units','points', ...
* 'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
* 'Callback','close(gcf);', ...
* 'ListboxTop',0, ...
* 'Position',[15 43.75 256.5 21.75], ...
* 'String','Close Current Window', ...
* 'Tag','Pushbutton1');
* h1 = uicontrol('Parent',h0, ...
*/
mlfAssign(
&h1,
mlfNUicontrol(
1,
mxCreateString("Parent"),
h0,
mxCreateString("Units"),
mxCreateString("points"),
mxCreateString("Callback"),
mxCreateString("set(gcf,'Color',[1,0,0]);"),
mxCreateString("ListboxTop"),
mlfScalar(0.0),
mxCreateString("Position"),
mlfDoubleMatrix(1, 4, __Array5_r, NULL),
mxCreateString("String"),
mxCreateString("Set Window to Red"),
mxCreateString("Tag"),
mxCreateString("Pushbutton1"),
NULL));
/*
* 'Units','points', ...
* 'Callback','set(gcf,''Color'',[1,0,0]);', ...
* 'ListboxTop',0, ...
* 'Position',[15 12 256.5 21.75], ...
* 'String','Set Window to Red', ...
* 'Tag','Pushbutton1');
* if nargout > 0, fig = h0; end
*/
if (mlfTobool(mlfGt(nargout, mlfScalar(0.0)))) {
mlfAssign(&fig, h0);
}
mclValidateOutputs("c6ftest", 1, nargout_, &fig);
mxDestroyArray(h0);
mxDestroyArray(h1);
mxDestroyArray(h2);
mxDestroyArray(mat0);
mxDestroyArray(nargout);
return fig;
}
/*
* The function "mlfNC6ftest" contains the nargout interface for the "c6ftest"
* M-function from file
* "C:\Xue.Dy\BOOKS\MATLAB\mat5progs\mat5files\chap6\c6ftest.m" (lines 1-54).
* 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 * mlfNC6ftest(int nargout) {
mxArray * fig = mclGetUninitializedArray();
mlfEnterNewContext(0, 0);
fig = Mc6ftest(nargout);
mlfRestorePreviousContext(0, 0);
return mlfReturnValue(fig);
}
/*
* The function "mlfC6ftest" contains the normal interface for the "c6ftest"
* M-function from file
* "C:\Xue.Dy\BOOKS\MATLAB\mat5progs\mat5files\chap6\c6ftest.m" (lines 1-54).
* This function processes any input arguments and passes them to the
* implementation version of the function, appearing above.
*/
mxArray * mlfC6ftest(void) {
int nargout = 1;
mxArray * fig = mclGetUninitializedArray();
mlfEnterNewContext(0, 0);
fig = Mc6ftest(nargout);
mlfRestorePreviousContext(0, 0);
return mlfReturnValue(fig);
}
/*
* The function "mlfVC6ftest" contains the void interface for the "c6ftest"
* M-function from file
* "C:\Xue.Dy\BOOKS\MATLAB\mat5progs\mat5files\chap6\c6ftest.m" (lines 1-54).
* 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 mlfVC6ftest(void) {
mxArray * fig = mclUnassigned();
mlfEnterNewContext(0, 0);
fig = Mc6ftest(0);
mlfRestorePreviousContext(0, 0);
mxDestroyArray(fig);
}
/*
* The function "mlxC6ftest" contains the feval interface for the "c6ftest"
* M-function from file
* "C:\Xue.Dy\BOOKS\MATLAB\mat5progs\mat5files\chap6\c6ftest.m" (lines 1-54).
* The feval function calls the implementation version of c6ftest through this
* function. This function processes any input arguments and passes them to the
* implementation version of the function, appearing above.
*/
void mlxC6ftest(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
mxArray * mplhs[1];
int i;
if (nlhs > 1) {
mlfError(
mxCreateString(
"Run-time Error: File: c6ftest Line: 1 Column: "
"0 The function \"c6ftest\" was called with mor"
"e than the declared number of outputs (1)"));
}
if (nrhs > 0) {
mlfError(
mxCreateString(
"Run-time Error: File: c6ftest Line: 1 Column:"
" 0 The function \"c6ftest\" was called with m"
"ore than the declared number of inputs (0)"));
}
for (i = 0; i < 1; ++i) {
mplhs[i] = NULL;
}
mlfEnterNewContext(0, 0);
mplhs[0] = Mc6ftest(nlhs);
mlfRestorePreviousContext(0, 0);
plhs[0] = mplhs[0];
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -