108 uu[i] = x[i+1+ModelFcn_NX];
111 pp[i] = x[i+1+ModelFcn_NX+ModelFcn_NU];
114 ww[i] = x[i+1+ModelFcn_NX+ModelFcn_NU+ModelFcn_NP];
117 mxArray* argOut[] = { FF };
119 mexCallMATLAB( 1,argOut, 6,argIn,
"generic_ode" );
120 double* ff = mxGetPr( *argOut );
125 mxDestroyArray( *argOut );
130 void mexFunction(
int nlhs, mxArray *plhs[],
int nrhs,
const mxArray *prhs[] )
143 ModelFcn_f = mxCreateString(
"matlab_integrator_ode_pendulum");
168 f << pendulumModel(x);
179 double x_start[2] = { 0.0, 0.0 };
180 double u_ [1] = { 1.0 };
181 double p_ [1] = { 1.0 };
192 integrator.
integrate( t_start, t_end, x_start, 0, p_, u_ );
void genericODE(double *x, double *f, void *userData)
unsigned int ModelFcn_NXA
returnValue set(OptionsName name, int value)
#define USING_NAMESPACE_ACADO
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
returnValue setForwardSeed(const int &order, const DVector &xSeed, const DVector &pSeed=emptyVector, const DVector &uSeed=emptyVector, const DVector &wSeed=emptyVector)
USING_NAMESPACE_ACADO mxArray * ModelFcn_f
virtual returnValue freezeAll()
returnValue clearAllStaticCounters()
Implements the Runge-Kutta-45 scheme for integrating ODEs.
returnValue integrateSensitivities()
returnValue integrate(double t0, double tend, double *x0, double *xa=0, double *p=0, double *u=0, double *w=0)
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.