⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buildb.m

📁 Speaker Verification Toolbox
💻 M
字号:
function B = buildB(n,mu)

% SYNTAX: B = buildB(n,mu)
% This function builds the transform matrix B(n,mu), which is used to test
% whether a Booealn function is A^mu.
% Ilya Shmulevich; Aug. 29, 2002

all_combs = nchoosek(2:2^n,mu)-1;                   % we don't want the zero-vectors here, so we start from 2
ncombs = length(all_combs);
conjs = zeros(ncombs,1);

for i = 1:ncombs,
    cjs = all_combs(i,1);
    for j = 2:mu,
        cjs = bitand(cjs,all_combs(i,j));
    end
    conjs(i) = cjs;
end

b = all_combs(logical(~conjs),:)+1;                 % add 1 for indexing
B = zeros(size(b,1),2^n);

for i = 1:size(B,1),
    B(i,b(i,:))=1;
end

⌨️ 快捷键说明

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