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?

 채택된 답변

Matt Tearle
Matt Tearle 2011년 5월 12일

6 개 추천

Have you tried setting the 'Display' option?
opts = optimset('Display','off');
... = lsqcurvefit(...,opts);

댓글 수: 4

Matthew
Matthew 2015년 11월 18일
Hi I tried this and I just get and error because lsqcurvefit is expecting lower or upper bounds
Matthew
Matthew 2015년 11월 18일
Hi I tried this and I just get and error because lsqcurvefit is expecting lower or upper bounds
Matthew
Matthew 2015년 11월 18일
Hi I tried this and I just get and error because lsqcurvefit is expecting lower or upper bounds
Keerthivasan Rajamani
Keerthivasan Rajamani 2017년 11월 9일
편집: Keerthivasan Rajamani 2017년 11월 9일
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);

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

추가 답변 (1개)

Zhibing
Zhibing 2011년 5월 12일

0 개 추천

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

카테고리

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

제품

질문:

2011년 5월 12일

편집:

2017년 11월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by