From 2006e1f9beaf58e0b12cddb3ecba10bfd9dde8f4 Mon Sep 17 00:00:00 2001
From: sebastien <sebastien@ac1d8469-bf42-47a9-8791-bf33cf982152>
Date: Mon, 24 Aug 2009 13:39:43 +0000
Subject: [PATCH] Don't display any table if option "noprint" is used (thanks
 to Gianni Lombardo for pointing this)

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2863 ac1d8469-bf42-47a9-8791-bf33cf982152
---
 matlab/dyntable.m | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/matlab/dyntable.m b/matlab/dyntable.m
index 71d33714a..30e93f800 100644
--- a/matlab/dyntable.m
+++ b/matlab/dyntable.m
@@ -1,7 +1,7 @@
 function dyntable(title,headers,labels,values,label_width,val_width, ...
 	       val_precis)
 
-% Copyright (C) 2002 Dynare Team
+% Copyright (C) 2002-2009 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -18,6 +18,12 @@ function dyntable(title,headers,labels,values,label_width,val_width, ...
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+  global options_
+  
+  if options_.noprint
+    return
+  end
+
   label_width = max(size(deblank(strvcat(headers(1,:),labels)),2)+2, ...
 		    label_width);
   val_width = max(size(deblank(headers(2:end,:)),2)+2,val_width);
-- 
GitLab