Is it possible to use lsqcurvefit without text messages?

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?

 채택된 답변

Brendan Hamm
Brendan Hamm 2015년 9월 10일
The following should work:
opt = optimoptions('lsqcurvefit','Display','off');
x = lsqcurvefit(fun,x0,xdata,ydata,lb,ub,opt)

댓글 수: 2

what is lb and ub??
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)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Least Squares에 대해 자세히 알아보기

질문:

2015년 9월 10일

댓글:

2015년 9월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by