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

📄 dsstruct.m

📁 这是一个国外的DST的Matlab工具箱
💻 M
字号:
function y=dsstruct(x)
%=========================================================================   
% dsstruct
%=========================================================================   
% y=dsstruct(x) returns a Dempster-Shafer structure with BPA x. 
%
% Input: 
% x (optional): A N-3 array containing
% [lower_bound,upper_bound,mass]      x是输入,一个N行3列包含下界,上界和mass函数,所有mass的和为1
% 
% Output:
% y: a new Dempster-Shafer structure  y是输出一个dempster-shafer结构体
% Example: 
% 
% dss=dsstruct([2,3,0.5;3,4,0.5])
% 
% If the sum of masses is not 1, masses will be normalized.如果mass的和不是1,矩阵将会被归一化
%Iflower_bound>upper_bound, they will be interchanged.如果下界比上界大,就交互一下
%=========================================================================
% Copyright (c) Philipp Limbourg, University of Duisburg-Essen
% www.uni-duisburg-essen.de/informationslogistik/
%=========================================================================
y.ds=[];
if nargin>0 %函数的参数的个数>0
y.ds=x;     %x的值给y.ds
[y,a,b]=dsnorm(y);  %归一化函数
if a>0      %表示下界>上界,需要归一化
  disp(sprintf('Warning, lower bound > upper bound for some elements: BPA normalized'));
end
if b>0      %表示mass之和不为1,也需要归一化
  disp(sprintf('Warning, mass <>1: BPA normalized'));
end
end

⌨️ 快捷键说明

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