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

📄 main.c

📁 Matlab经典算法__Arithmetic
💻 C
字号:
/*
 * MATLAB Compiler: 3.0
 * Date: Sat Sep 04 21:49:59 2004
 * 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" "-m" "-W" "main" "-L"
 * "C" "-t" "-T" "link:exe" "-h" "libmmfile.mlib" "main" "mrank" 
 */
#include "main.h"
#include "mrank.h"
static mxArray * _mxarray0_;

void InitializeModule_main(void) {
    _mxarray0_ = mclInitializeDouble(5.0);
}

void TerminateModule_main(void) {
    mxDestroyArray(_mxarray0_);
}

static void Mmain(void);

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

/*
 * The function "mlfMain" contains the normal interface for the "main"
 * M-function from file "d:\work\m_build1\main.m" (lines 1-2). This function
 * processes any input arguments and passes them to the implementation version
 * of the function, appearing above.
 */
void mlfMain(void) {
    mlfEnterNewContext(0, 0);
    Mmain();
    mlfRestorePreviousContext(0, 0);
}

/*
 * The function "mlxMain" contains the feval interface for the "main"
 * M-function from file "d:\work\m_build1\main.m" (lines 1-2). The feval
 * function calls the implementation version of main through this function.
 * This function processes any input arguments and passes them to the
 * implementation version of the function, appearing above.
 */
void mlxMain(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
    if (nlhs > 0) {
        mlfError(
          mxCreateString(
            "Run-time Error: File: main Line: 1 Column: 1 The function \"main\""
            " was called with more than the declared number of outputs (0)."),
          NULL);
    }
    if (nrhs > 0) {
        mlfError(
          mxCreateString(
            "Run-time Error: File: main Line: 1 Column: 1 The function \"main"
            "\" was called with more than the declared number of inputs (0)."),
          NULL);
    }
    mlfEnterNewContext(0, 0);
    Mmain();
    mlfRestorePreviousContext(0, 0);
}

/*
 * The function "Mmain" is the implementation version of the "main" M-function
 * from file "d:\work\m_build1\main.m" (lines 1-2). 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 main
 */
static void Mmain(void) {
    mexLocalFunctionTable save_local_function_table_
      = mclSetCurrentLocalFunctionTable(&_local_function_table_main);
    mxArray * r = NULL;
    /*
     * r=mrank(5);
     */
    mlfAssign(&r, mlfMrank(_mxarray0_));
    mxDestroyArray(r);
    mclSetCurrentLocalFunctionTable(save_local_function_table_);
}

⌨️ 快捷键说明

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