Mercurial > repos > public > sbplib
diff +time/+expint/expm_Arnoldi.m @ 697:8434063ed162 feature/optim
1 objective optimization finished
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Fri, 06 Oct 2017 13:51:21 +0200 |
parents | bc39bb984d88 |
children |
line wrap: on
line diff
--- a/+time/+expint/expm_Arnoldi.m Thu Oct 05 18:04:23 2017 +0200 +++ b/+time/+expint/expm_Arnoldi.m Fri Oct 06 13:51:21 2017 +0200 @@ -1,5 +1,7 @@ function y = expm_Arnoldi(A,v,t,toler,m) -% + +global iter + % y = expm_Arnoldi(A,v,t,toler,m) % % computes $y = \exp(-t A) v$ @@ -26,8 +28,11 @@ resnorm = inf; j=0; +iter = 0; + while resnorm > toler + iter = iter +1; j = j+1; w = A*V(:,j); for i=1:j