I've found some C code which implements a special kind of optimization algorithm. I'd like to interface it with matlab similar to the fmin function in the optimization toolbox. This would entail constructing a matlab function which could be evaluated from a C-program.
The C-program expects a pointer to a function. How can I set up the matlab function to respond to this pointer?
In fmin, this is accomplished by using an eval(evalstr) where evalstr is the name of the function patched together from the inputs. I'd like to do something similar to this as the function called from the C-program has many parameters.