wolffd@0: function [A, C, Q, R, initx, initV] = ensure_AR(A, C, Q, R, initx, initV, k, obs, diagonal) wolffd@0: % wolffd@0: % Ensure that the system matrices have the right form for an autoregressive process. wolffd@0: wolffd@0: ss = length(A); wolffd@0: if nargin<8, obs=ones(ss, 1); end wolffd@0: if nargin<9, diagonal=0; end wolffd@0: wolffd@0: [coef, C] = SS_to_AR(A, Q, k, diagonal); wolffd@0: [A, C, Q, R, initx, initV] = AR_to_SS(coef, C, obs);