I'm trying to fit a function using leasqr in Octave. This performs properly most of the time. Sometimes, however, leasqr fails to converge. (I'm not sure why, because the solution it comes up with looks fine).
Untill I can figure out why it's not converging I would like to suppress the output. But whenever leasqr fails to converge I get the following warning:
CONVERGENCE NOT ACHIEVED!
I've tried implementing the answer to this question, but it's not working for me. My code looks like this:
PAGER('/dev/null');
page_screen_output(1);
page_output_immediately(1);
[fx.k1,fx.lambda1,fx.c1,...
fx.k2,fx.lambda2,fx.c2] = peaktrack_expfit(t,Mn,fnr,mode);
How do I suppress these convergence messages?