Is it possible to use lsqcurvefit without text messages?

16 visualizaciones (últimos 30 días)
Mr M.
Mr M. el 10 de Sept. de 2015
Comentada: Brendan Hamm el 18 de Sept. de 2015
I dont want to see this in the command window:
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to its initial value is less than the default value of the function tolerance.
x =
498.8309 -0.1013
warning off is not a solution. So what to do?

Respuesta aceptada

Brendan Hamm
Brendan Hamm el 10 de Sept. de 2015
The following should work:
opt = optimoptions('lsqcurvefit','Display','off');
x = lsqcurvefit(fun,x0,xdata,ydata,lb,ub,opt)
  2 comentarios
Mr M.
Mr M. el 18 de Sept. de 2015
what is lb and ub??
Brendan Hamm
Brendan Hamm el 18 de Sept. de 2015
Lower and Upper bounds on the design variable. Both vectors of the same length as x (or scalars if the bound applies to all elements). If you are not using them simply pass in the empty array in their place:
opt = optimoptions('lsqcurvefit','Display','off');
x = lsqcurvefit(fun,x0,xdata,ydata,[],[],opt)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Least Squares en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by