/* The gateway routine */ void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { double *data, *omega, *alpha, *beta, *Ht, *covEst; int m,k,t,dimP,dimQ; int mrows,ncols; /* Check for proper number of arguments. */ if(nrhs!=10) mexErrMsgTxt("Ten inputs required."); if(nlhs!=1) mexErrMsgTxt("One output required."); /* Get the scalar inputs */ m = (int)mxGetScalar(prhs[4]); k = (int)mxGetScalar(prhs[5]); t = (int)mxGetScalar(prhs[6]); dimP = (int)mxGetScalar(prhs[7]); dimQ = (int)mxGetScalar(prhs[8]); /* Create a pointer to the input matrices . */ data = mxGetPr(prhs[0]); omega = mxGetPr(prhs[1]); alpha = mxGetPr(prhs[2]); beta = mxGetPr(prhs[3]); covEst = mxGetPr(prhs[9]); /* Get the dimensions of the matrix input ht to make an output matrix. */ mrows = mxGetM(prhs[0]); ncols = mxGetN(prhs[0]); /* Set the output pointer to the output matrix. */ plhs[0] = mxCreateDoubleMatrix(mrows,ncols, mxREAL); /* Create a C pointer to a copy of the output matrix. */ Ht = mxGetPr(plhs[0]); /* Call the C subroutine. */ makeh(data, omega, alpha, beta, m, mrows, k, dimP, dimQ, covEst, Ht); }
/* The gateway routine */ void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { double *data, *parameters, *Ht, *covEst; int p, q, m, T; int mrows,ncols; /* Check for proper number of arguments. */ if(nrhs!=7) mexErrMsgTxt("Seven inputs required."); if(nlhs!=1) mexErrMsgTxt("One output required."); /* Get the scalar inputs */ p = mxGetScalar(prhs[3]); q = mxGetScalar(prhs[4]); m = mxGetScalar(prhs[5]); T = mxGetScalar(prhs[6]); /* Create a pointer to the input matrices . */ data = mxGetPr(prhs[0]); parameters = mxGetPr(prhs[1]); covEst = mxGetPr(prhs[2]); /* Get the dimensions of the matrix input ht to make an output matrix. */ mrows = mxGetM(prhs[0]); ncols = mxGetN(prhs[0]); /* Set the output pointer to the output matrix. */ plhs[0] = mxCreateDoubleMatrix(mrows,ncols, mxREAL); /* Create a C pointer to a copy of the output matrix. */ Ht = mxGetPr(plhs[0]); /* Call the C subroutine. */ makeh(data,parameters,p, q, m, T, covEst, Ht); }