From 9b9eb4e078b81fea98252f429a683c84acf885e7 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Thu, 7 Jul 2011 15:31:46 +0200 Subject: [PATCH] irf_shocks bug fix in stoch_simul (Thanks to J. Pfeifer for pointing this out) --- matlab/getIrfShocksIndx.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/getIrfShocksIndx.m b/matlab/getIrfShocksIndx.m index 0974bcedc..715a530bc 100644 --- a/matlab/getIrfShocksIndx.m +++ b/matlab/getIrfShocksIndx.m @@ -24,6 +24,6 @@ if (isfield(options_,'irf_shocks')==0) else irf_shocks_indx = zeros(1,size(options_.irf_shocks,1)); for i=1:size(options_.irf_shocks,1) - irf_shocks_indx(i) = find(M_.exo_names==options_.irf_shocks(i)); + irf_shocks_indx(i) = find(strcmp(deblank(options_.irf_shocks(i,:)), cellstr(M_.exo_names))); end -end \ No newline at end of file +end