I am working on converting the matlab function gamfit into objective-c code. Towards the end of gamfit it calls another function called fzero: http://www.mathworks.com/help/techdoc/ref/fzero.html
Even after reading the matlab documentation, I am having trouble understanding how this function operates when x0 is a vector, as it is in my case.
Here is what the matlab documentation says on the subject: "If x0 is a vector of length two, fzero assumes x0 is an interval where the sign of fun(x0(1)) differs from the sign of fun(x0(2)). An error occurs if this is not true. Calling fzero with such an interval guarantees fzero will return a value near a point where fun changes sign."
I was hoping that maybe someone has already implemented this function in C/C++/objective-c to make things easier.
Any help would be appreciated.