From a3e1d17b9e21a7fcbd7cb512df2af6328b3ab5d4 Mon Sep 17 00:00:00 2001
From: Ferhat Mihoubi <ferhat.mihoubi@univ-evry.fr>
Date: Wed, 6 Jun 2012 16:29:26 +0200
Subject: [PATCH] Ramsey_policy is now compatible with bytecode option

---
 matlab/dyn_ramsey_static.m | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/matlab/dyn_ramsey_static.m b/matlab/dyn_ramsey_static.m
index 32616923df..f944afbf15 100644
--- a/matlab/dyn_ramsey_static.m
+++ b/matlab/dyn_ramsey_static.m
@@ -131,9 +131,14 @@ Uyy = reshape(Uyy,endo_nbr,endo_nbr);
 
 % set multipliers and auxiliary variables that
 % depends on multipliers to 0 to compute residuals
-[res,fJ] = feval([fname '_static'],xx,[oo.exo_simul oo.exo_det_simul], ...
+if (options_.bytecode)
+   [chck, res, junk] = bytecode('static',xx,[oo.exo_simul oo.exo_det_simul], ...
+               M.params, 'evaluate'); 
+   fJ = junk.g1;
+else
+   [res,fJ] = feval([fname '_static'],xx,[oo.exo_simul oo.exo_det_simul], ...
                M.params);
-
+end
 % index of multipliers and corresponding equations
 % the auxiliary variables before the Lagrange multipliers are treated
 % as ordinary endogenous variables
-- 
GitLab