From 6a8c968411dbd48ff6995e02610e215c6dc1fe64 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Mon, 29 Sep 2014 15:00:45 +0200 Subject: [PATCH] Filter out empty oo_.endo_simul in rplot.m --- matlab/rplot.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/matlab/rplot.m b/matlab/rplot.m index df7712535..387817018 100644 --- a/matlab/rplot.m +++ b/matlab/rplot.m @@ -35,13 +35,17 @@ global M_ oo_ options_ rplottype = options_.rplottype; +if isempty(oo_.endo_simul) + error('rplot: oo_.endo_simul is empty.') +end + col = ['y','c','r','g','b','w','m'] ; ix = [1 - M_.maximum_lag:size(oo_.endo_simul,2)-M_.maximum_lag]' ; y = []; for k=1:size(s1,1) if isempty(strmatch(s1(k,:),M_.endo_names,'exact')) - error (['One of the variable specified does not exist']) ; + error (['rplot: One of the variables specified does not exist']) ; end y = [y; oo_.endo_simul(strmatch(s1(k,:),M_.endo_names,'exact'),:)] ;