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

📄 beldst.m

📁 DS证据推理的置信函数(bel)的计算函数
💻 M
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   The coryright belongs to Yang Yang,Automation Institute,NPU,710072
%   Xi'an, China      
%   EDITION NUMBER: 1.0
%   Contract me : E-mail yay9096@hotmail.com ,
%                 Mobile : 13572239439,
%                 Home :   029-82375332
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function Bel=BelDST(mass)
%   calculate the Belief Function from bba m(.) in DST, the format is:
%   Bel=BelDST(mass)
%   mass: mass function,it is a vector for a  column.It have 4 elements
%        for two  class and 8 elements for three class ,the size is n*1.
%   Bel: output the Belief Function from gbba m(.),it have 4 elements
%        for two  class and 8 elements for three class ,the size is n*1.
% Interpretion:
%   The function can only calculate two or three classes for the Frame
%   within DSmT.If the Frame have 4 elements,  they are denoted in
%   Theta={A,B},and if it  have 8 elements,the Theta={A,B,C}. Then the
%   2^Theta={0,A,B,A|B} for  two dimensions ,2^Theta={0,A,B,A|B,C,A|C,B|C,A|B|C}
%   for three dimesions.  Then the Belief Function   from bba m(.) in DST
%   can be calculate in matrix .    

%   Do not hesitate to contract  me ,if you have any question.

[row,col]=size(mass);
%Judge the classes of the Frame
if row==4
    class=2;
    elseif row==8
            class=3;
    else disp(['The class number of the Frame is not two or three,the function can not be calculated']);
        return;    
end

if class==2
    Bel=[1,0,0,0;
         0,1,0,0;
         0,0,1,0;
         0,1,1,1;]*mass;
end
if class==3
    Bel=[1,0,0,0,0,0,0,0;
         0,1,0,0,0,0,0,0;
         0,0,1,0,0,0,0,0;
         0,1,1,1,0,0,0,0;
         0,0,0,0,1,0,0,0;
         0,1,0,0,1,1,0,0;
         0,0,1,0,1,0,1,0;
         0,1,1,1,1,1,1,1;            
         ]*mass;
end

⌨️ 快捷键说明

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