To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Revision:

root / _FullBNT / BNT / graph / mk_adjmat_chain.m @ 8:b5b38998ef3b

History | View | Annotate | Download (231 Bytes)

1
function G = mk_adjmat_chain(T)
2
% MK_DAG_CHAIN Make adjacency matrix for bi-directional Markov chain of  T nodes
3
% function G = mk_dag_chain(T)
4
%
5
% G(t,t+1) = 1 for all t<T
6

    
7
G = diag(ones(1,T-1),1) + diag(ones(1,T-1),-1);
8