How to remove the next output message after Fsolve iteration:Optimization terminated: first-order optimality is less than options.TolFun.

Hello I am developing a code in which I must solve PDES along a column, so I am suing different updating formulas that convert the PDES into algebraic equations, I am using fsolve.The code is taking quite long and I assume it is due to the fact that after each iteration the next message appears Optimization terminated: first-order optimality is less than options.TolFun. I have tried to do what in the help it is suggested:
xads=[Hco2(i,j);u(i,j-1);H(i,j);cco2(i,j)];
opts=optimset('Diagnostics','off','Display','off','TolX',0.01,'TolFun',0.01);
g=@(xads)myfunadstwo(xads,b1,b2,alfa,beta,bc2,bc1,cfeed,qs,rm);
xads=fsolve(@(xads)myfunadstwo(xads,b1,b2,alfa,beta,bc2,bc1,cfeed,qs,rm),xads,'opts');
however despite I put Display off, it goes on appearing this annoying message
what could I do?

Answers (1)

Pass opts, not 'opts'.
fsolve(...,xads,opts)
You are passing a string, not the options structure.
Alan Weiss
MATLAB mathematical toolbox documentation

Asked:

on 14 Apr 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!