> Is the boundary non-curved everywhere, or is it partially curved?
Non-curved everywhere. It's the convex hull of a finite set of vertices.
> You'll need to extend the definition of f(q,p) so that it can be evaluated in the interior of C as well as on the boundary. You must extrapolate it in such a way that no solution to f(q,p) = zeros(n,1) can exist in the interior. > > Once you do that, you can probably use FMINCON, assuming you have the Optimization Toolbox.
Alright, I'll have to think of a way to do that. Thanks!