function  [transmat,emmision]=sampling_parameters(transition_num,emmision_num,transmat11,emmision11)
Q=6;
for i=1:(3*Q+3)
    for j=1:(3*Q+3)
        if transmat11(i,j)~=0
            transition_num(i,j)=transition_num(i,j)+1;
        end
    end
end
for i=1:(3*Q+3)
    for j=1:20
        if emmision11(i,j)~=0
            emmision_num(i,j)=emmision_num(i,j)+1;
        end
    end
end 
for i=1:(3*Q+3)
    a=find(transmat11(i,:)>0);
    sampled_dir=dirichlet_sample_good(transition_num(i,a));
    transmat(i,a)=sampled_dir;
end
for i=1:(3*Q+3)
     a=find(emmision11(i,:)>0);
     if size(a,2)>0
          sampled_dir=dirichlet_sample_good(emmision_num(i,:));
          emmision(i,:)=sampled_dir; 
     end
end

