c_code.c

来自「matlab实现wcdma的全过程」· C语言 代码 · 共 66 行

C
66
字号
/* | | Copyright disclaimer: |   This software was developed at the National Institute of Standards |   and Technology by employees of the Federal Government in the course |   of their official duties. Pursuant to title 17 Section 105 of the |   United States Code this software is not subject to copyright |   protection and is in the public domain. | |   We would appreciate acknowledgement if the software is used. |*//*  */#include "mex.h"void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]){  int x,i_tmp, tmp, index   ;  double *code, *side;  /*  get the scalar input x */  x = (int)mxGetScalar(prhs[0]);      i_tmp = wcdma_code_init(x);  /* Create a matrix for the return argument */  plhs[0] = mxCreateDoubleMatrix(1, x, mxREAL);/**/  plhs[1] = mxCreateDoubleMatrix(1, 2, mxREAL);/**/    code = mxGetPr(plhs[0]);  side = mxGetPr(plhs[1]);      /*  code[0] = i_tmp;  code[x-1] =x;  /**/  /*printf("%d",i_tmp);/**/  index =  wcdma_ovsf_code_double(i_tmp, code);/**/  side[0] = i_tmp;  side[1] = index;  /*tmp = wcdma_code_free(i_tmp);/**/return;}/* [EOF] complex.c */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?