Skip to main content
. 2019 May 9;9(2):52. doi: 10.3390/diagnostics9020052
function [ranges,knowledgeDataBase,MFs] = knowledgeDB (maxnumrows,matrix,clustering,i)
calculate maximum from clustering;
for j = 1: maximum
k = find(clustering == j);
aA = matrix(k);
calculate min from aA; %this value is representing the value of b in the MF.
calculate max from aA; %this value is representing the value of c in the MF.
end
if min from aA == max from aA
MF(i) = ‘trimf’;
calculate the point_a. Point_c is the same value of max from aA or min from aA.
else
MF(i) = ‘trapmf’;
calculate the point_a and point_d for the Membership function.
end
knowledgeDataBase = [point_a Min(aA) Max(aA) point_d];
ranges = [min(aA) max(aA)];
MFs = MF;
end
end