From d6c5e1524089e16d85bace136600854c24beec7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien.villemot@ens.fr>
Date: Fri, 30 Apr 2010 12:23:57 +0200
Subject: [PATCH] datatomfile: if no second argument, then include all
 endogenous variables (cherry picked from commit
 6ef638a42d058c55c67247843e2a21074baf77a4)

---
 matlab/datatomfile.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/matlab/datatomfile.m b/matlab/datatomfile.m
index 6b35e4ead6..9832f8dac0 100644
--- a/matlab/datatomfile.m
+++ b/matlab/datatomfile.m
@@ -13,7 +13,7 @@ function datatomfile (s,var_list)
 % SPECIAL REQUIREMENTS
 %    none
 
-% Copyright (C) 2001-2009 Dynare Team
+% Copyright (C) 2001-2010 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -35,7 +35,7 @@ global M_ oo_
 sm=[s,'.m'];
 fid=fopen(sm,'w') ;
 
-if size(var_list,1) == 0
+if nargin < 2 || size(var_list,1) == 0
     var_list = M_.endo_names(1:M_.orig_endo_nbr,:);
 end
 n = size(var_list,1);
-- 
GitLab