📄 frpos2pro.m
字号:
function l = frPos2Pro(lvec)% l = frPos2Pro(lvec)%% From Possibility to Probability conversion using a bijective transformation.% Reference:% Dubois and Prade: 'Unfair coins and neccessity measures'% Fuzzy Sets and Systems 10 (1983) 15-20%% The elements in lvec represent a possibility distribution.% The result in l will be a corresponding probability distribution.% lvec has to be a row vector. % If max(lvec) ~= 1 (normalisation condition for poss. distr.) the set is % normalized by a mulitplying each element with 1/(max(lvec)).%% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK%% 13-Oct-1995% Last change: 13 Oct 1995n=length(lvec);l=zeros(1,n);% Normalisation if necessary: if (max(lvec) > 1.00001) | (max(lvec) < 0.99), lvec = (1./max(lvec)) .* lvec;end;% It is necessary to rank the elements in lvec in decreasing order so that% lvec(1)=1 :[lvec,index] = sort(lvec); % gives the elements in ascending order.lvec = fliplr(lvec); % now in decreasing order.index = fliplr(index);lvec=[lvec,0]; % extension for the loop where lvec(n+1) is used.for i=1:n, for k=i:n, l(i) = l(i) + (1./k .* (lvec(k)-lvec(k+1))); end;end;l(index) = l; % restoring the order according to the original.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -