又要来麻烦各位了,帮忙看这个问题怎么解决
<P>在编译这个程序时老是出现一个错误<BR><FONT size=3>#include “mex.h”<BR></FONT><FONT size=3>void timestwo(double y[],double x[])<BR></FONT><FONT size=3>{ <BR></FONT><FONT size=3>y=2.0*x<BR></FONT><FONT size=3>}<BR></FONT><FONT size=3>void mexFunction(int nlhs,mxArray*plhs[],int nrhs,const mxArray*prhs[])<BR></FONT><FONT size=3>{<BR></FONT><FONT size=3>double *x,*y;<BR></FONT><FONT size=3>int mrows,ncols;<BR></FONT><FONT size=3>if(nrhs!=1)<BR></FONT><FONT size=3> {<BR></FONT><FONT size=3> mexErrMsgTxt("One input required.");<BR></FONT><FONT size=3> }<BR></FONT><FONT size=3>else if (nlhs>1)<BR></FONT><FONT size=3>mexErrMsgTxt("Too many output argument");<BR></FONT><FONT size=3>mrows=mxGetM(prhs);<BR></FONT><FONT size=3>ncols=mxGetN(prhs);<BR> </FONT><FONT size=3>if(!mxIsDouble(prhs)||mxIsComplex(prhs)||!(mrows==1&&ncols==1))<BR></FONT><FONT size=3>mexMsgTxt("Input must be a noncomplex scalar double.");<BR></FONT><FONT size=3>plhs=mxCreateDoubleMatrix(mrows,ncols,mxREAL);<BR></FONT><FONT size=3>x=mxGetPr(prhs);<BR></FONT><FONT size=3>y=mxGetPr(plhs);<BR></FONT><FONT size=3>timestwo(y,x)<BR></FONT><FONT size=3>}<p></p></FONT></P><P>fatal error C1083: Cannot open include file: 'mex.h': No such file or directory<BR>Error executing cl.exe.<BR>是怎么回事?是不是VC中的连接没处理好?</P>
页:
[1]