【正文】
end。)。fprintf(39。)。%求?截距陣,當bij≥? 時,bij(?) =1;當bij<? 時,bij(?) =0 end end endfprintf(39。 for i=1:a for j=1:a if B(i,j)=k D(i,j)=1。D=zeros(a)。%循環(huán)計算R傳遞閉包endend程序四:求截矩陣:function [D k] =jjz4(B)L=unique(B)39。%R與R內(nèi)積,先取小再取大 end endendif B==R flag=1。flag=0。 disp(R)end程序三:計算傳遞閉包:function B=cd3(R)a=size(R)。模糊相似矩陣