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

📄 tmin.m

📁 FISMAT accommodates different arithmetic operators, fuzzification and defuzzification algorithm, imp
💻 M
字号:
function inter=Tmin(s1,s2)% inter=Tmin(s1,s2)%% T-norm min intersection operator between the two% alpha level sets.%% The given sets and the returned set have the same levels.%% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK%% 17 September 1996if nargin==0,  s1 = [1      1     1   ;        0.75  0.75  1.25 ;        0.5   0.5   1.5  ;	0.25  0.25  1.75];  s2 = [1      2     2   ;        0.75  1.75  2.25 ;        0.5   1.5   2.5  ;	0.25  1.25  2.75];  %s2=s1;end;[nol,c]=size(s1);inter=s1;inter(:,2:c) = NaN.*ones(nol,c-1);for i=1:nol,  % Find region in which the two cuts overlap:  %    First check if they overlap at all:  if ~(s1(i,3) < s2(i,2) | s2(i,3) < s1(i,2)),    from = max(s1(i,2),s2(i,2)); % overlap left bound.    to   = min(s1(i,3),s2(i,3)); % overlap right bound.    inter(i,2) = from;    inter(i,3) = to;  else    inter(i,2) = NaN;    inter(i,3) = NaN;  end;end;if nargin==0 | nargout==0,  x_max=max(max(s1(nol,3),s2(nol,3)),inter(nol,3));  x_min=min(min(s1(nol,2),s2(nol,2)),inter(nol,2));  from=x_min-(x_max-x_min)/100*10;  to=x_max+(x_max-x_min)/100*10;  subplot(3,1,1),plot_Lset(s1,'y');  title('Families of alpha-cuts:');  set(gca,'YTick',sort([s1(:,1);0]));  set(gca,'XTick',chop(sort([s1(:,2);s1(:,3);s2(:,2);s2(:,3)]),2));  axis([from to 0 1.2]);grid   ylabel('set1 levels');   subplot(3,1,2),plot_Lset(s2,'y');  ylabel('set2 levels');  set(gca,'YTick',sort([s1(:,1);0]));  set(gca,'XTick',chop(sort([s1(:,2);s1(:,3);s2(:,2);s2(:,3)]),2));  axis([from to 0 1.2]);grid  subplot(3,1,3),plot_Lset(inter,'r');  ylabel('Tmin');  set(gca,'YTick',sort([s1(:,1);0]));  set(gca,'XTick',chop(sort([s1(:,2);s1(:,3);s2(:,2);s2(:,3)]),2));  xlabel('Universe of discourse');  axis([from to 0 1.2]);gridend;

⌨️ 快捷键说明

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