Page MenuHomec4science

integrate.cpp
No OneTemporary

File Metadata

Created
Sun, Aug 4, 17:16

integrate.cpp

#include "matrix.h"
#include "mex.h"
#include "deltaNotch1.h"
void mexFunction(int nlhs,mxArray* plhs[],int nrhs, const mxArray *prhs[]){
char *modelname = mxArrayToString(prhs[0]);
double *state = mxGetPr(prhs[0]);
double *neighb = mxGetPr(prhs[1]);
double *params = mxGetPr(prhs[2]);
DeltaNotch1 dn(modelname);
dn.setContext(neighb);
dn.setParams(params);
integrate(dn,state,0,1,0.1);
plhs[0] = mxCreateDoubleMatrix(dim,1,mxREAL);
double *output = mxGetPr(plhs[0]);
for (int i=0;i<dim;i++){
output[i] = state[i];
}
}

Event Timeline