On 4/4/2013 7:39 AM, KUNHEE wrote: > Hi, I am trying to use fsolve for a problem I need to solve. > > The code works perfectly for one case (cartesian equations) but when > modified to adopt axisymmetric, it does not work. > > The error message shows : > "fsolve stopped because the relative size of the current step is less > than the > default value of the step size tolerance squared and the vector of > function values > is near zero as measured by the default value of the function tolerance." > > I have checked the coding several times but I am unable to fix this > problem. > I believe it is a problem with optimisation and to do with function > solution tolerances. I tried loosening up on MaxFunEvals, MaxIter, > which eliminated problem with premature stops, but I still have > stalling problem. I also tried TolFun and TolX, unfortunately, no > improvement. > > If anyone could suggest a solution or point me in the direction, or > just anything.....I am struggling big time. > > **SNIP** > Anyhelp will be greatly appreciated > Thanks a lot for even reading this long post > Thanks a lot > > Regards, > Thanks a lot
The exit message does not indicate a problem, and, indeed, fsolve told you it found a solution: "... the vector of function values is near zero as measured by the default value of the function tolerance."
Did you check to see if the solution was satisfactory? I bet it is.
Alan Weiss MATLAB mathematical toolbox documentation