Skip to content
Snippets Groups Projects
Verified Commit 0d96dd3d authored by Marco Ratto's avatar Marco Ratto Committed by Sébastien Villemot
Browse files

Trap the case when Q is null matrix

(cherry picked from commit 48ec0a60)
parent 0c5a8e7e
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,16 @@ function [Pstar,Pinf] = compute_Pinf_Pstar(mf,T,R,Q,qz_criterium, restrict_colum
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
np = size(T,1);
if iszero(Q)
% this may happen if users set Q=0 and use heteroskedastic shocks to set
% variances period by period
% this in practice triggers a form of conditional filter where states
% are initialized at st. state with zero variances
Pstar=T*0;
Pinf=T*0;
return
end
if nargin == 6
indx = restrict_columns;
indx0=find(~ismember([1:np],indx));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment