the first two slices.
(Such a two-slice temporal Bayes net is often called a 2TBN.)
<p>
We can specify the topology as follows.
<PRE>
intra = zeros(2);
intra(1,2) = 1; % node 1 in slice t connects to node 2 in slice t

inter = zeros(2);
inter(1,1) = 1; % node 1 in slice t-1 connects to node 1 in slice t
</pre>
We can specify the parameters as follows,
where for simplicity we assume the observed node is discrete.
<pre>
Q = 2; % num hidden states
O = 2; % num observable symbols

ns = [Q O];
dnodes = 1:2;
bnet