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

📄 test4.c

📁 该程序为MATLAB对CDMA系统个部分的仿真
💻 C
字号:
/*
 * MATLAB Compiler: 2.2
 * Date: Tue Jun 25 10:52:57 2002
 * 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" "-O" "none" "-O"
 * "fold_scalar_mxarrays:off" "-O" "fold_non_scalar_mxarrays:off" "-O"
 * "optimize_integer_for_loops:off" "-O" "array_indexing:off" "-O"
 * "optimize_conditionals:off" "-O" "fold_non_scalar_mxarrays:on" "-x" "-W"
 * "mex" "-L" "C" "-t" "-T" "link:mexlibrary" "libmatlbmx.mlib" "test4" 
 */
#include "test4.h"
#include "libmatlbm.h"

static mxChar _array1_[128] = { 'R', 'u', 'n', '-', 't', 'i', 'm', 'e', ' ',
                                'E', 'r', 'r', 'o', 'r', ':', ' ', 'F', 'i',
                                'l', 'e', ':', ' ', 't', 'e', 's', 't', '4',
                                ' ', 'L', 'i', 'n', 'e', ':', ' ', '1', ' ',
                                'C', 'o', 'l', 'u', 'm', 'n', ':', ' ', '1',
                                ' ', 'T', 'h', 'e', ' ', 'f', 'u', 'n', 'c',
                                't', 'i', 'o', 'n', ' ', '"', 't', 'e', 's',
                                't', '4', '"', ' ', 'w', 'a', 's', ' ', 'c',
                                'a', 'l', 'l', 'e', 'd', ' ', 'w', 'i', 't',
                                'h', ' ', 'm', 'o', 'r', 'e', ' ', 't', 'h',
                                'a', 'n', ' ', 't', 'h', 'e', ' ', 'd', 'e',
                                'c', 'l', 'a', 'r', 'e', 'd', ' ', 'n', 'u',
                                'm', 'b', 'e', 'r', ' ', 'o', 'f', ' ', 'o',
                                'u', 't', 'p', 'u', 't', 's', ' ', '(', '0',
                                ')', '.' };
static mxArray * _mxarray0_;

static mxChar _array3_[127] = { 'R', 'u', 'n', '-', 't', 'i', 'm', 'e', ' ',
                                'E', 'r', 'r', 'o', 'r', ':', ' ', 'F', 'i',
                                'l', 'e', ':', ' ', 't', 'e', 's', 't', '4',
                                ' ', 'L', 'i', 'n', 'e', ':', ' ', '1', ' ',
                                'C', 'o', 'l', 'u', 'm', 'n', ':', ' ', '1',
                                ' ', 'T', 'h', 'e', ' ', 'f', 'u', 'n', 'c',
                                't', 'i', 'o', 'n', ' ', '"', 't', 'e', 's',
                                't', '4', '"', ' ', 'w', 'a', 's', ' ', 'c',
                                'a', 'l', 'l', 'e', 'd', ' ', 'w', 'i', 't',
                                'h', ' ', 'm', 'o', 'r', 'e', ' ', 't', 'h',
                                'a', 'n', ' ', 't', 'h', 'e', ' ', 'd', 'e',
                                'c', 'l', 'a', 'r', 'e', 'd', ' ', 'n', 'u',
                                'm', 'b', 'e', 'r', ' ', 'o', 'f', ' ', 'i',
                                'n', 'p', 'u', 't', 's', ' ', '(', '4', ')',
                                '.' };
static mxArray * _mxarray2_;

void InitializeModule_test4(void) {
    _mxarray0_ = mclInitializeString(128, _array1_);
    _mxarray2_ = mclInitializeString(127, _array3_);
}

void TerminateModule_test4(void) {
    mxDestroyArray(_mxarray2_);
    mxDestroyArray(_mxarray0_);
}

static void Mtest4(mxArray * a, mxArray * b, mxArray * c, mxArray * d);

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

/*
 * The function "mlfTest4" contains the normal interface for the "test4"
 * M-function from file "D:\mywork\test4.m" (lines 1-5). This function
 * processes any input arguments and passes them to the implementation version
 * of the function, appearing above.
 */
void mlfTest4(mxArray * a, mxArray * b, mxArray * c, mxArray * d) {
    mlfEnterNewContext(0, 4, a, b, c, d);
    Mtest4(a, b, c, d);
    mlfRestorePreviousContext(0, 4, a, b, c, d);
}

/*
 * The function "mlxTest4" contains the feval interface for the "test4"
 * M-function from file "D:\mywork\test4.m" (lines 1-5). The feval function
 * calls the implementation version of test4 through this function. This
 * function processes any input arguments and passes them to the implementation
 * version of the function, appearing above.
 */
void mlxTest4(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
    mxArray * mprhs[4];
    int i;
    if (nlhs > 0) {
        mlfError(_mxarray0_);
    }
    if (nrhs > 4) {
        mlfError(_mxarray2_);
    }
    for (i = 0; i < 4 && i < nrhs; ++i) {
        mprhs[i] = prhs[i];
    }
    for (; i < 4; ++i) {
        mprhs[i] = NULL;
    }
    mlfEnterNewContext(0, 4, mprhs[0], mprhs[1], mprhs[2], mprhs[3]);
    Mtest4(mprhs[0], mprhs[1], mprhs[2], mprhs[3]);
    mlfRestorePreviousContext(0, 4, mprhs[0], mprhs[1], mprhs[2], mprhs[3]);
}

/*
 * The function "Mtest4" is the implementation version of the "test4"
 * M-function from file "D:\mywork\test4.m" (lines 1-5). 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 test4(a,b,c,d)
 */
static void Mtest4(mxArray * a, mxArray * b, mxArray * c, mxArray * d) {
    mexLocalFunctionTable save_local_function_table_
      = mclSetCurrentLocalFunctionTable(&_local_function_table_test4);
    int nargin_ = mclNargin(4, a, b, c, d, NULL);
    mclCopyArray(&a);
    mclCopyArray(&b);
    mclCopyArray(&c);
    mclCopyArray(&d);
    /*
     * if (nargin < 4)
     */
    if (mlfTobool(mclLt(mlfScalar(nargin_), mlfScalar(4)))) {
        /*
         * d = 0.0;
         */
        mlfAssign(&d, mlfScalar(0));
    /*
     * end
     */
    }
    mxDestroyArray(d);
    mxDestroyArray(c);
    mxDestroyArray(b);
    mxDestroyArray(a);
    mclSetCurrentLocalFunctionTable(save_local_function_table_);
}

⌨️ 快捷键说明

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