📄 getinf.m
字号:
function [I] = getinf(histN,histX)% where histN and histX are the output of% a [N,X] = hist(...) function call% That is, N is the frequencies, X are the bin centers% Center bin must be at Zero% I is the mutual informationlnX = length(histX);for k=1:lnX if(histN(k)) Ia(k) = (histN(k)/sum(histN))*log2((histN(k))/(0.5*(histN(k)+histN(lnX+1-k)))); else Ia(k)=0; endendfor(k=1:lnX) Ib(k) = Ia(k) + Ia(lnX+1-k);endI = 0.5*sum(Ib);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -