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

📄 test.cpp

📁 第一个例子
💻 CPP
字号:
//
// MATLAB Compiler: 3.0
// Date: Sun Dec 14 21:30:07 2003
// 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" "test.m" 
//
#include "test.hpp"
#include "libmatlbm.hpp"
#include "peaks.hpp"
static mwArray _mxarray0_ = mclInitializeDouble(1.0);

void InitializeModule_test() {
}

void TerminateModule_test() {
}

static void Mtest();

_mexLocalFunctionTable _local_function_table_test
  = { 0, (mexFunctionTableEntry *)NULL };

//
// The function "test" contains the normal interface for the "test" M-function
// from file "e:\matlab6p5\work\test\test.m" (lines 1-3). This function
// processes any input arguments and passes them to the implementation version
// of the function, appearing above.
//
void test() {
    Mtest();
}

//
// The function "mlxTest" contains the feval interface for the "test"
// M-function from file "e:\matlab6p5\work\test\test.m" (lines 1-3). The feval
// function calls the implementation version of test through this function.
// This function processes any input arguments and passes them to the
// implementation version of the function, appearing above.
//
void mlxTest(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
    MW_BEGIN_MLX();
    {
        if (nlhs > 0) {
            error(
              mwVarargin(
                mwArray(
                  "Run-time Error: File: test Line: 1 Column: 1"
                  " The function \"test\" was called with more "
                  "than the declared number of outputs (0).")));
        }
        if (nrhs > 0) {
            error(
              mwVarargin(
                mwArray(
                  "Run-time Error: File: test Line: 1 Column: 1"
                  " The function \"test\" was called with more "
                  "than the declared number of inputs (0).")));
        }
        Mtest();
    }
    MW_END_MLX();
}

//
// The function "Mtest" is the implementation version of the "test" M-function
// from file "e:\matlab6p5\work\test\test.m" (lines 1-3). 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 test
//
static void Mtest() {
    mwLocalFunctionTable save_local_function_table_
      = &_local_function_table_test;
    mwArray ans = mwArray::UNDEFINED;
    //
    // figure(1);
    //
    ans.EqAns(Nfigure(0, mwVarargin(_mxarray0_)));
    //
    // peaks;
    //
    ans.EqAns(Npeaks(0, NULL, NULL, mwArray::DIN));
}

⌨️ 快捷键说明

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