% % Inputs: % focal = one focal element (matrix) % listFocal = the list of elements in Theta (all different) % % Output: % bool = boolean: true if focal is in listFocal, elsewhere false %
% Copyright (c) 2008 Arnaud Martin n=size(listFocal,2);
bool=false; for i=1:n if isequal(listFocal{i},focal)
bool=true; break; end end end %%
function [decFocElem]=MaxFoc(funcDec,elemDecC,type) fieldN=fieldnames(funcDec);
switch fieldN{2}
case 'BetP'
funcDec.bba=funcDec.BetP;
case 'Bel' funcDec.bba=funcDec.Bel; case 'Pl' funcDec.bba=funcDec.Pl; case 'DSmP'
funcDec.bba=funcDec.DSmP;
end if type
[funcMax,indMax]=max(funcDec.bba); FocMax={funcDec.focal{indMax}};
else nbFocal=size(funcDec.focal,2); TabSing=[]; for foc=1:nbFocal if isElem(funcDec.focal{foc}, elemDecC)
TabSing=[TabSing [foc ; funcDec.bba(foc)]];
end end
[funcMax,indMax]=max(TabSing(2,:)); FocMax={funcDec.focal{TabSing(1,indMax)}};