From 21f9b98d6c75bbc6f5375e2b247e97c742290289 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Mon, 7 Jul 2014 09:33:09 +0200 Subject: [PATCH] reporting: add option to open report at end of compilation --- matlab/reports/@report/compile.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matlab/reports/@report/compile.m b/matlab/reports/@report/compile.m index 94572ffbd..7b1656868 100644 --- a/matlab/reports/@report/compile.m +++ b/matlab/reports/@report/compile.m @@ -31,6 +31,7 @@ function o = compile(o, varargin) % along with Dynare. If not, see . opts.compiler = o.compiler; +opts.showReport = true; if nargin > 1 if round((nargin-1)/2) ~= (nargin-1)/2 @@ -52,6 +53,7 @@ if nargin > 1 end assert(ischar(opts.compiler), '@report.compile: compiler file must be a string'); +assert(islogical(opts.showReport), '@report.compile: showReport must be either true or false'); if ~exist(o.fileName, 'file') o.write(); @@ -94,7 +96,7 @@ fprintf(1, '\n\nDone.\n'); disp('Your compiled report is located here:'); disp([' ' pwd filesep rfn '.pdf']); -if ~isoctave +if opts.showReport && ~isoctave open([pwd filesep rfn '.pdf']); end end \ No newline at end of file