You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mk_hmm_bnet.m
    path of file: ./repos/bnt/BNT/examples/static/Models/Old
    
    the code of the file until where you have to start completion: function [bnet, onodes] = mk_hmm_bnet(T, Q, O, cts_obs, param_tying)

    
function [bnet, onodes] = mk_hmm_bnet(T, Q, O, cts_obs, param_tying)
% MK_HMM_BNET Make a (static( bnet to represent a hidden Markov model
% [bnet, onodes] = mk_hmm_bnet(T, Q, O, cts_obs, param_tying)
%
% T = num time slices
% Q = num hidden states
% O = size of the observed node (num discrete values or length of vector)
% cts_obs - 1 means the observed node is a continuous-valued vector, 0 means it's discrete
% param_tying - 1 means we create 3 CPDs, 0 means we create 1 CPD per node

N = 2*T;
dag = zeros(N);
for i=1:T-1
  dag(i,i+1)=1;
end