?? corproen.m
字號:
function O=corproen(FAMbank,BeA,BdeA,L)% O=corproen(FAMbank,BeA,BdeA,L) %% Correlation-Product Encoding. Kosko (1992)%% Correlation-product encoding :% Defining pointwise the fuzzy Hebb matrix hebbbM by the minimum of the % "signals" BdeA(i) and BeA(j), an encoding scheme we shall call % correlation-minimum encoding. Fuzzy correlation constructs fuzzy matrices. % Correlation-minimum encoding produces a matrix of clipped BeA sets, while% the correlation-product encoding produces a matrix of scaled BeA sets. % In practise we sidestep this large numerical matrix with a virtual % representation scheme. In place of the matrix the user encodes the fuzzy-% set associations as linguistic entries in a FAM-bank linguistic matrix.%% L is the library of fuzzy sets for the output universe of discourse Y.% The universe of discourse is the most right collumn of L.% The system sums all O(i) to form the combined output fuzzy set O.% O is a row vector.%% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK%% 28-Feb-1994 % BeA and BdeA are the product of the bit vector B for each input and the % matrix A which contains the library of fuzzy sets.% Correllation minimum encoding => fuzzy Hebb matrix :A=BdeA';n=length(A); p=length(BeA); hebbM=zeros(n,p);for i=1:n, hebbM(i,:)=min((ones(1,p).*A(i)),BeA);end;% The hebb matrix contains now the w(i), which determines the degree, to % which the corresponding rule activates the consequent fuzzy set. % For the correllation-minimum encoding we, we clip the consequent fuzzy set % L(i) in the library of fuzzy-set values to the w(i) degree with pointwise% minimum. mOi(y)=min(w(i),mLi(Y)).% The library L is already rotated (rot90() and flipud()). % That means in each collumn one set. The most left represents Large Neg.% From mLi(ymin) at the top to mLi(ymax) at the bottom. [n,N]=size(L); % n=dimension of L. N number of library sets.[i,j]=find(FAMbank); % "coordinates" of existing rules.Oi=ones(length(i),n);for r=1:length(i), Oi(r,:)=hebbM(i(r),j(r)).*Oi(r,:).*(L(:,FAMbank(i(r),j(r))))';end;O=ones(1,length(i))*Oi; % O is a row vector with n elements.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -