?? test.c
字號(hào):
/*
* MATLAB Compiler: 2.2
* Date: Tue Jun 25 10:49:28 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" "-x" "-W" "mex" "-L" "C" "-t" "-T"
* "link:mexlibrary" "libmatlbmx.mlib" "test"
*/
#include "test.h"
#include "libmatlbm.h"
static double _array0_[4] = { 1.0, 0.0, 0.0, 1.0 };
static double _array1_[4] = { 3.141592653589793, -3.141592653589793,
1.5707963267948966, -1.5707963267948966 };
void InitializeModule_test(void) {
}
void TerminateModule_test(void) {
}
static mxArray * Mtest(int nargout_);
_mexLocalFunctionTable _local_function_table_test
= { 0, (mexFunctionTableEntry *)NULL };
/*
* The function "mlfTest" contains the normal interface for the "test"
* M-function from file "D:\mywork\test.m" (lines 1-3). This function processes
* any input arguments and passes them to the implementation version of the
* function, appearing above.
*/
mxArray * mlfTest(void) {
int nargout = 1;
mxArray * y = mclGetUninitializedArray();
mlfEnterNewContext(0, 0);
y = Mtest(nargout);
mlfRestorePreviousContext(0, 0);
return mlfReturnValue(y);
}
/*
* The function "mlxTest" contains the feval interface for the "test"
* M-function from file "D:\mywork\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[]) {
mxArray * mplhs[1];
int i;
if (nlhs > 1) {
mlfError(
mxCreateString(
"Run-time Error: File: test Line: 1 Column: 1 The function \"test\""
" was called with more than the declared number of outputs (1)."));
}
if (nrhs > 0) {
mlfError(
mxCreateString(
"Run-time Error: File: test Line: 1 Column: 1 The function \"test\""
" was called with more than the declared number of inputs (0)."));
}
for (i = 0; i < 1; ++i) {
mplhs[i] = mclGetUninitializedArray();
}
mlfEnterNewContext(0, 0);
mplhs[0] = Mtest(nlhs);
mlfRestorePreviousContext(0, 0);
plhs[0] = mplhs[0];
}
/*
* The function "Mtest" is the implementation version of the "test" M-function
* from file "D:\mywork\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 y = test
*/
static mxArray * Mtest(int nargout_) {
mexLocalFunctionTable save_local_function_table_
= mclSetCurrentLocalFunctionTable(&_local_function_table_test);
mxArray * y = mclGetUninitializedArray();
/*
* y = [ 1 0; 0 1] * [ pi pi/2; -pi -pi/2 ];
*/
mlfAssign(
&y,
mclMtimes(
mlfDoubleMatrix(2, 2, _array0_, (double *)NULL),
mlfDoubleMatrix(2, 2, _array1_, (double *)NULL)));
mclValidateOutput(y, 1, nargout_, "y", "test");
mclSetCurrentLocalFunctionTable(save_local_function_table_);
return y;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -