Unverified Commit 5a8d2e90 authored by Johannes Pfeifer's avatar Johannes Pfeifer Committed by Sébastien Villemot
Browse files

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

(cherry picked from commit 3b592534)
parent 1b1ca68c
Pipeline #6646 failed with stages
in 416 minutes and 14 seconds
......@@ -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
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