📄 map_bpsk.c
字号:
/*
* MATLAB Compiler: 3.0
* Date: Fri Mar 24 11:31:37 2006
* 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"
* "adptive_bitpow_allocate_systems"
*/
#include "map_bpsk.h"
#include "libmatlbm.h"
static mxArray * _mxarray0_;
static mxArray * _mxarray1_;
void InitializeModule_map_bpsk(void) {
_mxarray0_ = mclInitializeDouble(1.0);
_mxarray1_ = mclInitializeDouble(-1.0);
}
void TerminateModule_map_bpsk(void) {
mxDestroyArray(_mxarray1_);
mxDestroyArray(_mxarray0_);
}
static mxArray * Mmap_bpsk(int nargout_, mxArray * input);
_mexLocalFunctionTable _local_function_table_map_bpsk
= { 0, (mexFunctionTableEntry *)NULL };
/*
* The function "mlfMap_bpsk" contains the normal interface for the "map_bpsk"
* M-function from file
* "c:\matlab6p5\work\adptive_ofdm\adptive_ofdm\map_bpsk.m" (lines 1-8). This
* function processes any input arguments and passes them to the implementation
* version of the function, appearing above.
*/
mxArray * mlfMap_bpsk(mxArray * input) {
int nargout = 1;
mxArray * output = NULL;
mlfEnterNewContext(0, 1, input);
output = Mmap_bpsk(nargout, input);
mlfRestorePreviousContext(0, 1, input);
return mlfReturnValue(output);
}
/*
* The function "mlxMap_bpsk" contains the feval interface for the "map_bpsk"
* M-function from file
* "c:\matlab6p5\work\adptive_ofdm\adptive_ofdm\map_bpsk.m" (lines 1-8). The
* feval function calls the implementation version of map_bpsk through this
* function. This function processes any input arguments and passes them to the
* implementation version of the function, appearing above.
*/
void mlxMap_bpsk(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
mxArray * mprhs[1];
mxArray * mplhs[1];
int i;
if (nlhs > 1) {
mlfError(
mxCreateString(
"Run-time Error: File: map_bpsk Line: 1 Column:"
" 1 The function \"map_bpsk\" was called with m"
"ore than the declared number of outputs (1)."),
NULL);
}
if (nrhs > 1) {
mlfError(
mxCreateString(
"Run-time Error: File: map_bpsk Line: 1 Column:"
" 1 The function \"map_bpsk\" was called with m"
"ore than the declared number of inputs (1)."),
NULL);
}
for (i = 0; i < 1; ++i) {
mplhs[i] = NULL;
}
for (i = 0; i < 1 && i < nrhs; ++i) {
mprhs[i] = prhs[i];
}
for (; i < 1; ++i) {
mprhs[i] = NULL;
}
mlfEnterNewContext(0, 1, mprhs[0]);
mplhs[0] = Mmap_bpsk(nlhs, mprhs[0]);
mlfRestorePreviousContext(0, 1, mprhs[0]);
plhs[0] = mplhs[0];
}
/*
* The function "Mmap_bpsk" is the implementation version of the "map_bpsk"
* M-function from file
* "c:\matlab6p5\work\adptive_ofdm\adptive_ofdm\map_bpsk.m" (lines 1-8). 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 output=map_bpsk(input)
*/
static mxArray * Mmap_bpsk(int nargout_, mxArray * input) {
mexLocalFunctionTable save_local_function_table_
= mclSetCurrentLocalFunctionTable(&_local_function_table_map_bpsk);
mxArray * output = NULL;
mclCopyArray(&input);
/*
* if input==1;
*/
if (mclEqBool(mclVa(input, "input"), _mxarray0_)) {
/*
* output=1;
*/
mlfAssign(&output, _mxarray0_);
/*
* else
*/
} else {
/*
* output=-1;
*/
mlfAssign(&output, _mxarray1_);
/*
* end
*/
}
mclValidateOutput(output, 1, nargout_, "output", "map_bpsk");
mxDestroyArray(input);
mclSetCurrentLocalFunctionTable(save_local_function_table_);
return output;
/*
*
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -