From 75675d3677b8392eccbbb82bec57b3fc230681cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?=
 <stephane.adjemian@univ-lemans.fr>
Date: Mon, 12 Mar 2012 10:34:28 +0100
Subject: [PATCH] Code simplification, do not pass endo_simul and exo_simul to
 bytecode through the global structure oo_.

---
 matlab/ep/extended_path.m | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/matlab/ep/extended_path.m b/matlab/ep/extended_path.m
index 39cbe022d..657356f77 100644
--- a/matlab/ep/extended_path.m
+++ b/matlab/ep/extended_path.m
@@ -203,10 +203,8 @@ while (t<sample_size)
     endo_simul = endo_simul_1;
     while 1
         if ~increase_periods
-            if bytecode_flag
-                oo_.endo_simul = endo_simul_1;
-                oo_.exo_simul = exo_simul_1;
-                [flag,tmp] = bytecode('dynamic');
+            if bytecode_flag && ~options_.ep.stochastic.order
+                [flag,tmp] = bytecode('dynamic',endo_simul_1,exo_simul_1);
             else
                 flag = 1;
             end
@@ -282,10 +280,8 @@ while (t<sample_size)
                 exo_simul_1  = [ exo_simul_1 ; zeros(ep.step,exo_nbr)];
             end
             % Solve the perfect foresight model with an increased number of periods.
-            if bytecode_flag
-                oo_.endo_simul = endo_simul_1;
-                oo_.exo_simul = exo_simul_1;
-                [flag,tmp] = bytecode('dynamic');
+            if bytecode_flag && ~options_.ep.stochastic.order
+                [flag,tmp] = bytecode('dynamic',endo_simul_1,exo_simul_1);
             else
                 flag = 1;
             end
-- 
GitLab