Index: mttroot/mtt/bin/trans/m/mtt_optimise.m ================================================================== --- mttroot/mtt/bin/trans/m/mtt_optimise.m +++ mttroot/mtt/bin/trans/m/mtt_optimise.m @@ -53,11 +53,11 @@ theta = theta_0; Theta = []; Error = []; Y = []; iterations = 0; - while (abs(error_old-error)>criterion)&&(iterationscriterion)&&(abs(error)>criterion)&&(iterationscriterion)&&(iterationscriterion)&&(abs(error)>criterion)&&(iterations(error_old+criterion) # Reduce step size and try again factor = 10; disp(sprintf("%2.2f*step",alpha)); error = error_old; # Go back to previous error value error_old = inf; # Don't let it think its converged