?? timestwo.c
字號:
#include "mex.h"
void timestwo(double y[],double x[])
{
y[0]=2.0*x[0];
}
void mexFunction(int nlhs,mxArray *plhs[],int nrhs,const mxArray *prhs[])
{
double *x,*y;
int mrows,ncols;
mrows=mxGetM(prhs[0]);
ncols=mxGetN(prhs[0]);
plhs[0]=mxCreateDoubleMatrix(mrows,ncols,mxREAL);
x=mxGetPr(prhs[0]);
y=mxGetPr(plhs[0]);
timestwo(y,x);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -