Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!1995occbin: fix bug if there is only a surprise shock in the first period
......@@ -56,7 +56,7 @@ if isfield(M_,'surprise_shocks') && ~isempty(M_.surprise_shocks)
ivar = M_.surprise_shocks(ii).exo_id;
temp(M_.surprise_shocks(ii).periods,ivar) = M_.surprise_shocks(ii).value;
end
shock_index=~all(temp==0);
shock_index=~all(temp==0,1);
options_.occbin.simul.SHOCKS=temp(:,shock_index);
options_.occbin.simul.exo_pos=find(shock_index);
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment