Do not trap order>2 in estimation.

time-shift
Stéphane Adjemian (Charybdis) 2019-12-19 22:52:39 +01:00
parent 53c9d9de69
commit 227b2661cb
2 changed files with 2 additions and 9 deletions

View File

@ -52,7 +52,7 @@ end
% Set particle filter flag.
if options_.order > 1
if options_.particle.status && options_.order==2
if options_.particle.status
skipline()
disp('Estimation using a non linear filter!')
skipline()
@ -78,12 +78,8 @@ if options_.order > 1
end
end
end
elseif options_.particle.status && options_.order>2
error(['Non linear filter are not implemented with order ' int2str(options_.order) ' approximation of the model!'])
elseif ~options_.particle.status && options_.order==2
error('For estimating the model with a second order approximation using a non linear filter, one should have options_.particle.status=true;')
else
error(['Cannot estimate a model with an order ' int2str(options_.order) ' approximation!'])
error('For estimating the model with a second order approximation using a non linear filter, one should have options_.particle.status=true;')
end
end

View File

@ -101,9 +101,6 @@ if length(unique(options_.varobs))<length(options_.varobs)
end
% Check the perturbation order (nonlinear filters with third order perturbation, or higher order, are not yet implemented).
if options_.order>2
error(['I cannot estimate a model with a ' int2str(options_.order) ' order approximation of the model!'])
end
% analytical derivation is not yet available for kalman_filter_fast
if options_.analytic_derivation && options_.fast_kalman_filter