lsqcurvefit command window exit flag suppression

lsqcurvefit dumps its exit flags in the work space. i.e
lsqcurvefit stopped because the problem appears to be locally singular.
or
Optimization completed because the size of the gradient is less than the default value of the function tolerance.
is there any way to suppress these outputs in the command window?

 Akzeptierte Antwort

Andrew Newell
Andrew Newell am 14 Feb. 2012

0 Stimmen

You could include options in your call to lsqcurvefit and set Display to 'off':
opts = optimset('lsqcurvefit');
optimset(opts,'Display','off');
... = lsqcurvefit(...,opts);

3 Kommentare

Thijs
Thijs am 14 Feb. 2012
Thanks that did the trick..
though is there any reason you suggested:
opts = optimset('lsqcurvefit');
optimset(opts,'Display','off');
rather than simply
opts = optimset('Display','off');
opts=optimset('lsqcurvefit') sets a lot of options specific to lsqcurvefit. In practice, it probably doesn't make much difference.
Mr M.
Mr M. am 29 Mai 2016
for me, neither version is working

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Gefragt:

am 14 Feb. 2012

Kommentiert:

am 29 Mai 2016

Community Treasure Hunt

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

Start Hunting!

Translated by