FMINCON requires that the objective function and constraint function are in separate functions. This creates a problem, because both the I've created a simple example to demonstrate a simple multiple shooting transcription algorithm (using Matlab's FMINCON to solve the underlying optimization).