Skip to content
Snippets Groups Projects
Commit 13a67737 authored by michel's avatar michel
Browse files

v4 dynare_solve: added jacobian_flag for the case where we want numerical derivatives (unfinished)

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v3@621 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 8e7deead
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
function [x,check] = dynare_solve(func,x,varargin) function [x,check] = dynare_solve(func,x,varargin)
global gstep_ options_ debug_ global gstep_ options_ debug_
% unfinished
jacobian_flag = 0;
options_ = set_default_option(options_,'solve_algo',2); options_ = set_default_option(options_,'solve_algo',2);
check = 0; check = 0;
func = str2func(func); func = str2func(func);
...@@ -26,7 +30,7 @@ function [x,check] = dynare_solve(func,x,varargin) ...@@ -26,7 +30,7 @@ function [x,check] = dynare_solve(func,x,varargin)
if options_.solve_algo == 1 if options_.solve_algo == 1
nn = size(x,1) ; nn = size(x,1) ;
[x,check]=solve1(func,x,1:nn,1:nn,varargin{:}); [x,check]=solve1(func,x,1:nn,1:nn,jacobian_flag,varargin{:});
elseif options_.solve_algo == 2 elseif options_.solve_algo == 2
nn = size(x,1) ; nn = size(x,1) ;
% tolf = eps^(2/3) ; % tolf = eps^(2/3) ;
...@@ -82,4 +86,4 @@ function [x,check] = dynare_solve(func,x,varargin) ...@@ -82,4 +86,4 @@ function [x,check] = dynare_solve(func,x,varargin)
% 08/28/03 MJ add a final call to solve1 for solve_algo == 1 in case % 08/28/03 MJ add a final call to solve1 for solve_algo == 1 in case
% initvals generates 'false' zeros in the Jacobian % initvals generates 'false' zeros in the Jacobian
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment