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

📄 l_neg.m

📁 FISMAT accommodates different arithmetic operators, fuzzification and defuzzification algorithm, imp
💻 M
字号:
function res=L_neg(Lset)% res=L_neg(Lset)%% Negation of the fuzzy quantity Lset in level-set representation.%% The fuzzy quantity Lset is defined in terms of alpha-cuts (level sets).% The first column of both s1 and s2 define the levels that are required to be% equal. The second and third column define the alpha cut of the associated level.% In consequence only convex fuzzy quantities are allowed.%% If invoked without lefthand arguments a plot is generated. If invoked without% input parameters, an example is created.%% Reference:% D.Dubois, H.Prade:% "Possibility Theory"% Plenum Press, 1986% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK% 6 August 1996% Last change: 6 August 1996 if nargin==0,  %Lset = Trap2L([0 1 1 3],4);  %Lset = Trap2L([-3 -1 -1 0],4);  Lset = Trap2L([-2 0 0 1],4);end;nol = size(Lset,1);res=Lset; % Determine the negation of Q:for level=1:nol,  res(level,2) = -1*Lset(level,3);  res(level,3) = -1*Lset(level,2);end; if nargin==0 | nargout==0,  x_max=max(Lset(nol,3),res(nol,3));  x_min=min(Lset(nol,2),res(nol,2));  from=x_min-(x_max-x_min)/100*10;  to=x_max+(x_max-x_min)/100*10;  subplot(2,1,1),plot_Lset(Lset,'y');  title('Families of alpha-cuts:');  set(gca,'YTick',sort([Lset(:,1);0]));  set(gca,'XTick',chop(sort([Lset(:,2);Lset(:,3);res(:,2);res(:,3)]),2));  axis([from to 0 1.2]);grid   ylabel('Q');   subplot(2,1,2),plot_Lset(res,'r');  ylabel('-Q');  set(gca,'YTick',sort([Lset(:,1);0]));  set(gca,'XTick',chop(sort([Lset(:,2);Lset(:,3);res(:,2);res(:,3)]),2));  xlabel('Universe of discourse');  axis([from to 0 1.2]);gridend;

⌨️ 快捷键说明

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