The following excerpt from imcforecast.m seems to be causing a crash with conditional_forecast:

[quote]for i = 1:n1

idx = [idx ; oo_.dr.inv_order_var(strmatch(deblank(constrained_vars(i,:)),M_.endo_names,‘exact’))];

jdx = [jdx ; strmatch(deblank(options_cond_fcst.controlled_varexo(i,:)),M_.exo_names,‘exact’)];

end

mv = zeros(n1,NumberOfStates);

mu = zeros(ExoSize,n2);

for i=1:n1

mv(i,idx(i)) = 1;

mu(jdx(i),i) = 1;

end

[/quote]

I think the problem is with

[quote] idx = [idx ; oo_.dr.inv_order_var(strmatch(deblank(constrained_vars(i,:)),M_.endo_names,‘exact’))];

[/quote]

I bypass this problem by directly inserting the constrained_vars somewhere and it works. Also there seems to be a problem with plot_icforecast.m

What I did was to save the output before calling this function, but it’s not convenient.

Can one carry out k-step ahead analysis here too and how?

Thank you

Olayeni