From: Frank on
How can I stop the messages such as "lsqr stopped at iteration 20 without converging to the desired tolerance 0.001 because the maximum number of iterations was reached." during the after execution of the function?

Thanks a lot.
From: Wayne King on
"Frank " <allinone_2003(a)yahoo.com.hk> wrote in message <i3djtd$fk1$1(a)fred.mathworks.com>...
> How can I stop the messages such as "lsqr stopped at iteration 20 without converging to the desired tolerance 0.001 because the maximum number of iterations was reached." during the after execution of the function?
>
> Thanks a lot.

Hi Frank, It's been a while since I used that function, but are you using the flag output argument with lsqr?

[X,FLAG] = lsqr(...)

I think that should capture that warning (as an integer) and not output the actual warning in the workspace. (if I remember correctly)

Wayne
From: Frank on
Thanks, Wayne.


> Hi Frank, It's been a while since I used that function, but are you using the flag output argument with lsqr?
>
> [X,FLAG] = lsqr(...)
>
> I think that should capture that warning (as an integer) and not output the actual warning in the workspace. (if I remember correctly)
>
> Wayne