⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c6ftest.cpp

📁 本人收集的一些有关matlab的代码程序设计 也不知道改选什么分类
💻 CPP
字号:
//
// MATLAB Compiler: 2.0.1
// Date: Fri May 05 22:24:33 2000
// Arguments: "-p" "-B" "sglcpp" "-m" "-W" "mainhg" "-L" "Cpp" "c6ftest" 
//
#include "c6ftest.hpp"

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 mwArray Mc6ftest(int nargout_) {
    mwArray fig(mclGetUninitializedArray());
    mwArray h0(mclGetUninitializedArray());
    mwArray h1(mclGetUninitializedArray());
    mwArray h2(mclGetUninitializedArray());
    mwArray mat0(mwArray::UNASSIGNED);
    mwArray nargout(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
    //
    loadc_(
      "c6ftest",
      "fig",
      &fig,
      "h0",
      &h0,
      "h1",
      &h1,
      "h2",
      &h2,
      "mat0",
      &mat0,
      NULL);
    //
    // 
    // h0 = figure('Color',[0.8 0.8 0.8], ...
    //
    h0
      = Nfigure(
          1,
          mwVarargin(
            "Color",
            mwArray(1, 3, __Array0_r, NULL),
            "Colormap",
            mat0,
            "FileName",
            "C:\\matlabr11\\work\\c6ftest.m",
            "PaperPosition",
            mwArray(1, 4, __Array1_r, NULL),
            "PaperUnits",
            "points",
            "Position",
            mwArray(1, 4, __Array2_r, NULL),
            "Tag",
            "Fig1",
            "ToolBar",
            "none"));
    //
    // '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, ...
    //
    h1
      = Nuimenu(
          1,
          mwVarargin("Parent", h0, "Label", "New Tools", "Tag", "mnuNewTool"));
    //
    // 'Label','New Tools', ...
    // 'Tag','mnuNewTool');
    // h2 = uimenu('Parent',h1, ...
    //
    h2
      = Nuimenu(
          1,
          mwVarargin(
            "Parent",
            h1,
            "Callback",
            "close(gcf)",
            "Label",
            "Close Current Window",
            "Tag",
            "&HelpSubuimenu1"));
    //
    // 'Callback','close(gcf)', ...
    // 'Label','Close Current Window', ...
    // 'Tag','&HelpSubuimenu1');
    // h2 = uimenu('Parent',h1, ...
    //
    h2
      = Nuimenu(
          1,
          mwVarargin(
            "Parent",
            h1,
            "Callback",
            "set(gcf,'Color',[1,0,0])",
            "Label",
            "Set Windows to Red",
            "Tag",
            "mnuSetRed"));
    //
    // 'Callback','set(gcf,''Color'',[1,0,0])', ...
    // 'Label','Set Windows to Red', ...
    // 'Tag','mnuSetRed');
    // h1 = uicontrol('Parent',h0, ...
    //
    h1
      = Nuicontrol(
          1,
          mwVarargin(
            "Parent",
            h0,
            "Units",
            "points",
            "BackgroundColor",
            mwArray(1, 3, __Array3_r, NULL),
            "Callback",
            "close(gcf);",
            "ListboxTop",
            0.0,
            "Position",
            mwArray(1, 4, __Array4_r, NULL),
            "String",
            "Close Current Window",
            "Tag",
            "Pushbutton1"));
    //
    // '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, ...
    //
    h1
      = Nuicontrol(
          1,
          mwVarargin(
            "Parent",
            h0,
            "Units",
            "points",
            "Callback",
            "set(gcf,'Color',[1,0,0]);",
            "ListboxTop",
            0.0,
            "Position",
            mwArray(1, 4, __Array5_r, NULL),
            "String",
            "Set Window to Red",
            "Tag",
            "Pushbutton1"));
    //
    // '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 (tobool(nargout > mwArray(0.0))) {
        fig = h0;
    }
    mwValidateOutputs("c6ftest", 1, nargout_, &fig);
    return fig;
}

//
// The function "Nc6ftest" 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.
//
mwArray Nc6ftest(int nargout) {
    mwArray fig(mclGetUninitializedArray());
    fig.CopyOutputArg(Mc6ftest(nargout));
    return fig;
}

//
// The function "c6ftest" 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.
//
mwArray c6ftest() {
    int nargout(1);
    mwArray fig(mclGetUninitializedArray());
    fig.CopyOutputArg(Mc6ftest(nargout));
    return fig;
}

//
// The function "Vc6ftest" 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 Vc6ftest() {
    mwArray fig(mwArray::UNASSIGNED);
    fig.CopyOutputArg(Mc6ftest(0));
}

//
// 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[]) {
    MW_BEGIN_MLX();
    {
        mwArray mplhs[1];
        if (nlhs > 1) {
            error(
              "Run-time Error: File: c6ftest Line: 1 Column:"
              " 0 The function \"c6ftest\" was called with m"
              "ore than the declared number of outputs (1)");
        }
        if (nrhs > 0) {
            error(
              "Run-time Error: File: c6ftest Line: 1 Column:"
              " 0 The function \"c6ftest\" was called with m"
              "ore than the declared number of inputs (0)");
        }
        mplhs[0].CopyOutputArg(Mc6ftest(nlhs));
        plhs[0] = mplhs[0].FreezeData();
    }
    MW_END_MLX();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -