DATA SEGMENT INPUT DB 250 db ? db 240 DUP(0) COUNT DB 250 DUP(0) NUMBER DB 0 STR1 DB 'Please enter your letters,and press enter to end your input','$' STR2 DB 0DH,0AH,'The number of chars:','$' STR3 DB 0DH,0AH,'You hab NOT input any letter','$' HUIC
function mi = MI(a,b) %Caculate MI of a and b in the region of the overlap part %计算重叠部分 [Ma,Na] = size(a); [Mb,Nb] = size(b); M=min(Ma,Mb); N=min(Na,Nb); %初始化直方图数组 hab = zeros(256,256); ha = zeros(1,256); hb = zeros(1,256); %归一化 if max(max(a))~=min(