mycos.cpp
来自「《MATLAB实用指南》系列丛书DE源代码」· C++ 代码 · 共 43 行
CPP
43 行
#include "matlib.h"
#pragma hdrstop
#include "Mycos.h"
Mm Mycos(Mm x1, Mm x2) {
begin_scope
x1.setname("x1"); x2.setname("x2");
dMm(X); dMm(Y);
#line 1 "d:/matlab_c/matcom/mycos.m"
call_stack_begin;
#line 1 "d:/matlab_c/matcom/mycos.m"
// nargin, nargout entry code
double old_nargin=nargin_val; if (!nargin_set) nargin_val=2.0;
nargin_set=0;
double old_nargout=nargout_val; if (!nargout_set) nargout_val=0.0;
nargout_set=0;
// translated code
#line 2 "d:/matlab_c/matcom/mycos.m"
_ X = colon(x1,0.1,x2);
#line 3 "d:/matlab_c/matcom/mycos.m"
_ Y = cos(X);
#line 4 "d:/matlab_c/matcom/mycos.m"
_ plot((CL(X),Y));
call_stack_end;
// nargin, nargout exit code
nargin_val=old_nargin; nargout_val=old_nargout;
// function exit code
x1.setname(NULL); x2.setname(NULL);
return x_M;
end_scope
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?