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

📄 dsnorm.asv

📁 这是一个国外的DST的Matlab工具箱
💻 ASV
字号:
function [y,a,b]=dsnorm(y)
%=========================================================================   
% dsnorm函数的目的是归一化
%=========================================================================   
% y=dsnorm(x) 
% Normalizes a Dempster-Shafer structure x. Normalizes masses to 1 and
% interchanges lower_bound & upper_bound, if lower_bound>upper_bound.
%
% Input: 
% x: Dempster-Shafer structure to be normalized要被归一化的Demspter-shafer结构体
%
% Output:
% y: Normalized Dempster-Shafer structure归一化的Demspter-shafer结构体
%
% Usage:
% foo=dsstruct
% foo.ds=[3,2,1]
% bar=dsnorm(foo)
%=========================================================================
% Copyright (c) Philipp Limbourg, University of Duisburg-Essen
% www.uni-duisburg-essen.de/informationslogistik/
%=========================================================================
vec=y.ds(:,1)>y.ds(:,2);   %把大者给vec
a=0;
b=0;
if sum(vec)>0 
    a=1;         %a=1  表示vec的和>0
end
temp=y.ds(find(vec),1);
y.ds(find(vec),1)=y.ds(find(vec),2);
y.ds(find(vec),2)=temp;         %交换三部曲
s=sum(y.ds(:,3));
if s~=1
    b=1;      %如果b=1说明s不为1
end
y.ds(:,3)=y.ds(:,3)/s;

⌨️ 快捷键说明

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