Commit 3b592534 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

occbin: fix bug if there is only a surprise shock in the first period

parent d8c99ff5
...@@ -56,7 +56,7 @@ if isfield(M_,'surprise_shocks') && ~isempty(M_.surprise_shocks) ...@@ -56,7 +56,7 @@ if isfield(M_,'surprise_shocks') && ~isempty(M_.surprise_shocks)
ivar = M_.surprise_shocks(ii).exo_id; ivar = M_.surprise_shocks(ii).exo_id;
temp(M_.surprise_shocks(ii).periods,ivar) = M_.surprise_shocks(ii).value; temp(M_.surprise_shocks(ii).periods,ivar) = M_.surprise_shocks(ii).value;
end end
shock_index=~all(temp==0); shock_index=~all(temp==0,1);
options_.occbin.simul.SHOCKS=temp(:,shock_index); options_.occbin.simul.SHOCKS=temp(:,shock_index);
options_.occbin.simul.exo_pos=find(shock_index); options_.occbin.simul.exo_pos=find(shock_index);
end end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment