?? match.m
字號:
function A=match(X,xi,setlib)% A=match(X,xi,setlib)%% The function is realizing the fuzzification.% For a given "crisp" input value xi, this function uses a % binary unit vector of the same length of X (universe of % discourse) with a single 1 element in the ith slot.% This binary unit vector is multiplied with each vector % representing a membershipfunction in the set-library setlib.% A then is a row vector containing the fit-value to which the% crisp input xi fits to the corresponding set.%% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK% % 19-April-1994% note: later may be better to pass xmin and xmax directly.[m,n] = size(X);% limiting xi to the universe of discourse. That means each xi % outside the range is set equal to the range limits and gets the% corresponding fit value.xmin = X(1,1); xmax = X(1,n); dx = xmax-xmin;xi=max(xi,xmin); xi=min(xi,xmax); slot = max(1,round(n*(xi-xmin)/dx));% To save computational effort, not binary unit vector is generated and% used.A=setlib(:,slot);% A is a collumn vector containing the fit values from the given% crisp input xi to all 'ling. terms' of the 'ling. var.'.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -