function [A, Q, C, R, init_x, init_V] = extract_lds_from_dbn(bnet)
% EXTRACT_LDS_FROM_DBN Extract the matrices for a Linear Dynamic System from a dbn.
% [A, Q, C, R, init_x, init_V] = extract_lds_from_dbn(bnet)
%
%      A
%   X1 -> X2 (Q)
% C |     | 
%   v     v
%   Y1    Y2 (R)


A = bnet.bnodes{3}.weights;
Q = bnet.bnodes{3}.cov;
C = bnet.bnodes{2}.weights;
R = bnet.bnodes{2}.cov;
init_x = bnet.bnodes{1}.mean(:);
init_V = bnet.bnodes{1}.cov;

