📄 fastloop.c
字号:
#include <mex.h>
void mexFunction(int nlhs,mxArray *plhs[],int nrhs,const mxArray *prhs[])
{
//输入
double *w_speech;
int beg,len;
//输出
double *R;
//************************
int colw;
int i,j;
w_speech=mxGetPr(prhs[0]);
beg=mxGetScalar(prhs[1]);
len=mxGetScalar(prhs[2]);
colw=mxGetN(prhs[0]);
plhs[0]=mxCreateDoubleMatrix(1,len,mxREAL);
R=mxGetPr(plhs[0]);
//程序主体
for (i=0;i<len;i++)
{
for (j=160;j<colw;j=j+2)
{
R[i]=R[i]+w_speech[j]*w_speech[j-beg-i];
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -