Advertisement
Guest User

mxsmdvquad.c

a guest
Jan 29th, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include "smdvquad.h"
  2.  
  3. void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
  4.     // y = smdv_quad(Q,x)
  5.     //check_smdv_quad_input(nrhs, prhs);
  6.  
  7.     const mxArray *Q, *x;
  8.     double L;
  9.     double *output;
  10.  
  11.     x = prhs[1];
  12.     Q = prhs[0];
  13.  
  14.     const double *xVec = mxGetPr(x);
  15.     smdv_quad(Q, &xVec, &L);
  16.  
  17.     plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
  18.     output = mxGetPr(plhs[0]);
  19.     output[0] = L;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement