about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/Kalman/ensure_AR.m
blob: e89edfa338c4ff988d68dca9d00f66dc4e1844be (plain)
1
2
3
4
5
6
7
8
9
10
function [A, C, Q, R, initx, initV] = ensure_AR(A, C, Q, R, initx, initV, k, obs, diagonal)
%
% Ensure that the system matrices have the right form for an autoregressive process.

ss = length(A);
if nargin<8, obs=ones(ss, 1); end
if nargin<9, diagonal=0; end

[coef, C] = SS_to_AR(A, Q, k, diagonal);
[A, C, Q, R, initx, initV] = AR_to_SS(coef, C, obs);