📄 get_ovsf_code_indexes.c
字号:
/* | Project: WCDMA simulation environment | Module: | Author: Maarit Melvasalo | Date: June 1999 | | History: | June 11, 1999 Maarit Melvasalo | | | Desc: | This is a matlab function which return | suitable indexes for all given codes. | | If suitalbe indexes are not foud returns -1 | | | Limitations: | Code lengths must be in between 2^2 ... 2^8 | The index must be greater tahn 0 and less or equal | to code length | | Depends on files: | code.c and code.h | | Function call: | index = c_get_code_indexes([4 4 4 4 4]) | retruns : | index = 2 3 4 1 -1 | | See also function: get_ovsf_code | | | | | 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 n, i, nCode ,tmp; double *index; double *codes; /* get the scalar input x */ n = (int)mxGetN(prhs[0]); /*mxGetScalar(prhs[0]);/**/ codes = mxGetPr(prhs[0]); /* Create a matrix for the return argument */ plhs[0] = mxCreateDoubleMatrix(1, n, mxREAL);/**/ index = mxGetPr(plhs[0]); wcdma_get_indexes(n,codes,index);return;}/* [EOF] complex.c */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -