1.模糊关系最大-最小合成:
function [T]=max_minCompound(R,S)
[m1,n1]=size®;
[m2,n2]=size(S);
if n1==m2
for i=1:m1
for j=1:n2
T(i,j)=max(min(R(i,:),S(:,j)’));
end
end
else
fprint(‘矩阵输入错误’);
end
2.模糊向量笛卡尔积:
function[D]=cartesian_product(A,B)
[a1,a2]=size(A);
[b1,b2]=size(B);
if a1==b1
C=A’;
for i=1:a2
for j=1:b2
D(i,j)=min(A(i,1),B(1,j))
end
end
else
fprintf('输入矩阵不规范')
end
3.模糊向量的内积:
function[e]=inner_product(A,B)
[m,n]=size(A);
if size(A)==size(B)
C=B’;
for i=1:n
D(i)=min(A(i),B(i));
end
e = max(D’)
else
fprintf(‘输入矩阵不规范’)
end