From c8874b742e65adae274b0415d9d04ab286227391 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Scylla=29?=
 <stephane.adjemian@univ-lemans.fr>
Date: Mon, 9 Dec 2013 11:07:44 +0100
Subject: [PATCH] Copy the generated time series in Base workspace
 (extended_path).

(cherry picked from commit 1b57cb4a073140f42055f82a9476e5b36ebdee2b)
---
 matlab/ep/extended_path.m      | 5 ++++-
 preprocessor/ComputingTasks.cc | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/matlab/ep/extended_path.m b/matlab/ep/extended_path.m
index c0bdaa3a61..bcafdc2bc4 100644
--- a/matlab/ep/extended_path.m
+++ b/matlab/ep/extended_path.m
@@ -350,4 +350,7 @@ end% (while) loop over t
 
 dyn_waitbar_close(hh);
 
-oo_.endo_simul = oo_.steady_state;
+if ~nargout
+    oo_.endo_simul = [initial_conditions, time_series];
+    dyn2vec;
+end
\ No newline at end of file
diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc
index 36b1d456e5..b56685497b 100644
--- a/preprocessor/ComputingTasks.cc
+++ b/preprocessor/ComputingTasks.cc
@@ -2477,8 +2477,8 @@ ExtendedPathStatement::writeOutput(ostream &output, const string &basename) cons
     if (it->first != string("periods"))
       output << "options_." << it->first << " = " << it->second << ";" << endl;
 
-  output << "oo_.endo_simul = [ oo_.steady_state, extended_path([], " << options_list.num_options.find("periods")->second
-         << ") ];" << endl
+  output << "extended_path([], " << options_list.num_options.find("periods")->second
+         << ");" << endl
          << "oo_.exo_simul = oo_.ep.shocks;" << endl;
 }
 
-- 
GitLab