isselfdual.m
来自「Speaker Verification Toolbox」· M 代码 · 共 15 行
M
15 行
function tf = isselfdual(f)
% SYNTAX: tf = isselfdual(f)
% This function takes a column vector representing a truth table of a Boolean function
% and determines whether or not this function is self-dual.
% Ilya Shmulevich; 08/23/02
% Modified: 24/02/2003 by IS.
tf = 0; % default is FALSE
n = length(f)/2; % half of the length of the truth table
%tf = all([eye(n) rot90(eye(n))]*f);
%tf = (sum([eye(n) rot90(eye(n))]*f) == n);
tf = ([eye(n) rot90(eye(n))]*f) == ones(n,1);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?