function[] = DST_test()
%Sample code for SLDS (a trivial DST)

T = 20; %number of time steps in time series
N =3; %number of time series
ydim = 2; %dimension of emission (observed) variable
xdim = 2; %dimension of state space

%create DST data structure
for n=1:N

    DST(1).N = N;
	DST(1).type = 1;    %type 1 = internal node (aggregating chain)
	DST(1).S = 2; %number of discrete states
	DST(1).T(n) = T;
    DST(1).child(1) = 2; %number of child DST
 
    DST(2).y{n} = data;
    
    DST(2).N = N;
    DST(2).T(n) = T;
    DST(2).ydim = ydim; 
    DST(2).xdim = xdim;
    DST(2).missing{n} = zeros(1,T);	
    DST(2).type = 3;
    DST(2).parent = 2;

end

%intialize model
DST = DST_init(DST,1); 

if(nargin==9)
    
    [DST, b1] = DST_em3(DST, iter, kl,0, [fname '_' int2str(m)]);
    [DST, b2] = DST_em2(DST, iter, kl,0, [fname '_' int2str(m)]);
    bound = [b1 b2];
else
    [DST, b1] = DST_em3(DST, iter, kl,0);
    [DST, b2] = DST_em2(DST, iter, kl,0);
    bound = [b1 b2];
    
end

save([fname int2str(0)]);
