From 632c0a3943328b6bdc00629320dd9db0824418e8 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Mon, 6 Jan 2020 09:06:18 +0100 Subject: [PATCH] sim1.m: provide missing function input to nested function --- matlab/perfect-foresight-models/sim1.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/perfect-foresight-models/sim1.m b/matlab/perfect-foresight-models/sim1.m index 0db50e2b0..3bd956c91 100644 --- a/matlab/perfect-foresight-models/sim1.m +++ b/matlab/perfect-foresight-models/sim1.m @@ -99,7 +99,7 @@ for iter = 1:options.simul.maxit break end if options.simul.robust_lin_solve - dy = -lin_solve_robust(A, res, verbose); + dy = -lin_solve_robust(A, res, verbose, options); else dy = -lin_solve(A, res, verbose); end @@ -173,7 +173,7 @@ if relres > 1e-6 && verbose fprintf('WARNING : Failed to find a solution to the linear system.\n'); end -function [ x, flag, relres ] = lin_solve_robust(A, b ,verbose) +function [ x, flag, relres ] = lin_solve_robust(A, b ,verbose, options) if norm(b) < sqrt(eps) % then x = 0 is a solution x = 0; flag = 0;