?? createmarkovmodel.m
字號:
function[Cliques] = CreateMarkovModel(NumbVar,dim) % Creates the structure of a junction tree where each variable% depends on its dim previous variables % INPUTS% NumbVar: Number of variables% dim: Number of previous variables each variables depends on % OUTPUTS% Cliques: Structure of the model in a list of cliques that defines the (chain shaped) junction tree. %---Each row of Cliques is a clique. The first value is the number of overlapping variables. %---The second, is the number of new variables.%---Then, overlapping variables are listed and finally new variables are listed. if(dim==0) for i=1:NumbVar Cliques(i,1) = 0; Cliques(i,2) = 1; Cliques(i,3) = i; endelse Cliques(1,1) = 0; Cliques(1,2) = dim; Cliques(1,3:dim+2) = 1:dim; for i=dim+1:NumbVar Cliques(i-dim+1,1) = dim; Cliques(i-dim+1,2) = 1; Cliques(i-dim+1,3:dim+2) = [i-dim:i-1]; Cliques(i-dim+1,dim+3) = i; endend% Last version 9/26/2005. Roberto Santana (rsantana@si.ehu.es)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -