diff --git a/core/VBA_check.m b/core/VBA_check.m index cf74d9cc..30af062e 100644 --- a/core/VBA_check.m +++ b/core/VBA_check.m @@ -176,13 +176,14 @@ gsi = find([options.sources.type]==0); for i=1:numel(gsi) for t=1:dim.n_t - diQ = diag(priors.iQy{t,i}).*~options.isYout(options.sources(gsi(i)).out,t); - options.isYout(options.sources(gsi(i)).out,t) = ~diQ; - priors.iQy{t,i} = diag(diQ)*priors.iQy{t,i}*diag(diQ); + diQ = (diag(priors.iQy{t,i}) == 0) || options.isYout(options.sources(gsi(i)).out,t); + options.isYout(options.sources(gsi(i)).out,t) = diQ; + priors.iQy{t,i} = diag(~diQ)*priors.iQy{t,i}*diag(~diQ); end end end + % store evolution/observation function handles options.f_fname = f_fname; options.g_fname = g_fname;