Skip to content

Instantly share code, notes, and snippets.

@ghorn
Created November 2, 2013 21:10
Show Gist options
  • Save ghorn/7283549 to your computer and use it in GitHub Desktop.
Save ghorn/7283549 to your computer and use it in GitHub Desktop.
typedef callback_t .....; // callback function
int run_export(int numX, int numU, callback_t * ode, callback_t * ref, .........){
vector<DifferentialState> xvec;
vector<Control> uvec;
for (int k=0; k<numX; k++){
DifferentialState x;
xvec.push_back(x);
}
for (int k=0; k<numU; k++){
Control u;
uvec.push_back(u);
}
DifferentialEquation f = ode(xvec, uvec);
Function r = ref(xvec, uvec);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment