?? ex0802.cpp
字號(hào):
//
// MATLAB Compiler: 3.0
// Date: Tue Dec 02 11:53:22 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" "Ex0802.m"
//
#include "ex0802.hpp"
#include "libmatlbm.hpp"
static double _array1_[63] = { 0.0, .1, .2, .30000000000000004, .4, .5,
.6000000000000001, .7000000000000001, .8, .9,
1.0, 1.1, 1.2000000000000002, 1.3,
1.4000000000000001, 1.5, 1.6, 1.7000000000000002,
1.8, 1.9000000000000001, 2.0, 2.1, 2.2,
2.3000000000000003, 2.4000000000000004, 2.5, 2.6,
2.7, 2.8000000000000003, 2.9000000000000004, 3.0,
3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0,
4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0,
5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0,
6.1000000000000005, 6.2 };
static mwArray _mxarray0_ = mclInitializeDoubleVector(1, 63, _array1_);
void InitializeModule_ex0802() {
}
void TerminateModule_ex0802() {
}
static void Mex0802();
_mexLocalFunctionTable _local_function_table_ex0802
= { 0, (mexFunctionTableEntry *)NULL };
//
// The function "ex0802" contains the normal interface for the "ex0802"
// M-function from file "c:\my documents\caoyi\bookmatlab\exe\ex0802\ex0802.m"
// (lines 1-6). This function processes any input arguments and passes them to
// the implementation version of the function, appearing above.
//
void ex0802() {
Mex0802();
}
//
// The function "mlxEx0802" contains the feval interface for the "ex0802"
// M-function from file "c:\my documents\caoyi\bookmatlab\exe\ex0802\ex0802.m"
// (lines 1-6). The feval function calls the implementation version of ex0802
// through this function. This function processes any input arguments and
// passes them to the implementation version of the function, appearing above.
//
void mlxEx0802(int nlhs, mxArray * plhs[], int nrhs, mxArray * prhs[]) {
MW_BEGIN_MLX();
{
if (nlhs > 0) {
error(
mwVarargin(
mwArray(
"Run-time Error: File: ex0802 Line: 1 Column: 1"
" The function \"ex0802\" was called with more "
"than the declared number of outputs (0).")));
}
if (nrhs > 0) {
error(
mwVarargin(
mwArray(
"Run-time Error: File: ex0802 Line: 1 Column: "
"1 The function \"ex0802\" was called with mor"
"e than the declared number of inputs (0).")));
}
Mex0802();
}
MW_END_MLX();
}
//
// The function "Mex0802" is the implementation version of the "ex0802"
// M-function from file "c:\my documents\caoyi\bookmatlab\exe\ex0802\ex0802.m"
// (lines 1-6). 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 Ex0802
//
static void Mex0802() {
mwLocalFunctionTable save_local_function_table_
= &_local_function_table_ex0802;
mwArray ans = mwArray::UNDEFINED;
mwArray y = mwArray::UNDEFINED;
mwArray x = mwArray::UNDEFINED;
//
// % Ex0802 繪制正弦信號(hào)波形
// x=0:0.1:2*pi;
//
x = _mxarray0_;
//
// y=sin(x);
//
y = sin(mwVv(x, "x"));
//
// plot(x,y)
//
ans.EqPrintAns(Nplot(0, mwVarargin(mwVv(x, "x"), mwVv(y, "y"))));
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -