select_max_config.m

来自「The BNL toolbox is a set of Matlab funct」· M 代码 · 共 17 行

M
17
字号
function [cliquetable,septable]=select_max_config(cliquetable,septable)

numb_clqs=length(cliquetable.pots);
for i=1:numb_clqs
    siz=cliquetable.dim{i};
    table=reshape(cliquetable.pots{i},prod(siz(1:end-1)),siz(end));
    m=max(table);
    maxtable=repmat(m, prod(siz(1:end-1)),1);
    a=(table==maxtable);
    cliquetable.pots{i}(:)=reshape(a,siz);;
    
end
%put potentials of separators to 1
a= find(~isemptycell(septable.pots));
for i=a'
    septable.pots{i}(:)=1;
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?