?? beldsmt.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=BelDSmT(mass)
% calculate the Belief Function from gbba m(.) in DSmT, the format is:
% Bel=BelDSmT(mass)
% mass: mass function,it is a vector for a column.It have 5 elements
% for two class and 18 elements for three class ,the size is n*1.
% Bel: output the Belief Function from gbba m(.),it have 5 elements
% for two class and 18 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 5 elements, they are denoted in
% Theta={A,B},and if it have 18 elements,the Theta={A,B,C}. Then the
% D^Theta={0,A&B,A,B,A|B} for two dimensions . Then the Belief Function
% from gbba m(.) in DSmT can be calculate in matrix .
% Note that the order of e1 and e2 must be set in the order of D^Theta.
% Other Noting ,it has eighteen elements in the D^Theta for three
% class,and it do not have the first 0 in the code order for belief
% representation,you know that it should have nineteen elements in it.You
% should see my document for the order of three class in D^Theta.
% Do not hesitate to contract me ,if you have any question.
[row,col]=size(mass);
%Judge the classes of the Frame
if row==5
class=2;
elseif row==18
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,1,0,0,0;
1,1,1,0,0;
1,1,0,1,0;
1,1,1,1,1;]*mass;
end
if class==3
Bel=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0;
1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0;
1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0;
1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0;
1,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0;
1,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0;
1,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0;
1,1,1,1,1,1,1,1,0,0,1,1,0,0,0,0,0,0;
1,1,1,1,1,1,1,1,0,1,0,0,1,0,0,0,0,0;
1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0;
1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,0,0,0;
1,1,1,1,1,1,1,1,1,0,1,1,0,1,0,1,0,0;
1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0,1,0;
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
]*mass;
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -