How to suppress messages from function lsqcurvefit?

I am using lsqcurvefit inside large nested for loops. The following messages are printed in the command window thousands or sometimes millions of times.
Message:
Local minimum found. Optimization completed because the size of the gradient is less thanthe default value of the function tolerance.
stopping criteria details>
The question is how can I suppress these messages?

 Respuesta aceptada

Matt Tearle
Matt Tearle el 12 de Mayo de 2011
Have you tried setting the 'Display' option?
opts = optimset('Display','off');
... = lsqcurvefit(...,opts);

4 comentarios

Matthew
Matthew el 18 de Nov. de 2015
Hi I tried this and I just get and error because lsqcurvefit is expecting lower or upper bounds
Matthew
Matthew el 18 de Nov. de 2015
Hi I tried this and I just get and error because lsqcurvefit is expecting lower or upper bounds
Matthew
Matthew el 18 de Nov. de 2015
Hi I tried this and I just get and error because lsqcurvefit is expecting lower or upper bounds
Keerthivasan Rajamani
Keerthivasan Rajamani el 9 de Nov. de 2017
Editada: Keerthivasan Rajamani el 9 de Nov. de 2017
That is beucase, options comes after the Lower and Upper bound entries in the syntax. So the below would be helpful: ...=lsqcurvefit(fun, [1 2 3], xdata,ydata,[ ],[ ],opts);

Iniciar sesión para comentar.

Más respuestas (1)

Zhibing
Zhibing el 12 de Mayo de 2011

0 votos

using options in the lsqcurvefit function can work:
options=optimset('Display','off');
thanks Matt!

Categorías

Más información sobre Matrix Computations en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 12 de Mayo de 2011

Editada:

el 9 de Nov. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by