You completely misunderstand things.
If an objective function has multiple local minimizers, then depending on the start point, an optimizer might converge to any of them, depending on where you start it. This is called a basin of attraction. (Rosenbrock has ONE solution, though hard to find for some very basic optimizers.) So if you start in the basin of a given minimum, then you will end there. A basin need not be a contiguous set, depending on the algorithm. So in this case, a numerical optimizer MAY find different solutions, depending on where it starts.
It is also true that for a different set of start points, even within the SAME basin, you will generally converge to subtly different results, all of which are hopefully within the convergence tolerance. It is the "same" answer though, just different by tiny amount.
In some cases on nasty, difficult to solve problems, an optimizer might stop short of the true solution, when the point it currently has satisfies all of the convergence tests. Hey, thats life. Look for easier problems to solve next time. :)
As far as your question goes, the Rosenbrock function has only one local minimizer. So your question falls into the second issue I describe. Check to see if all the solutions were truly, EXACTLY equal to [1 1].
I'd also be very careful. While I did not look that deeply at your code, it appears as if for some silly reason, you are trying to start from an integer start point. An optimizer like fminunc cannot work with integers, because that makes your function non-differentiable. So it would never even move from the start point.
Best Answer