?? entropy.m
字號:
function h = entropy(vec1)%=========================================================%%This is a prog in the MutualInfo 0.9 package written by % Hanchuan Peng.%%Disclaimer: The author of program is Hanchuan Peng% at <penghanchuan@yahoo.com> and <phc@cbmv.jhu.edu>.%%The CopyRight is reserved by the author.%%Last modification: April/19/2002%%========================================================%% h = entropy(vec1)% calculate the entropy of a variable vec1%% demo: % a=[1 2 1 2 1]';b=[2 1 2 1 1]';% fprintf('entropy(a) = %d\n',entropy(a));%% the same as entropycond(vec1)%% By Hanchuan Peng, April/2002%if nargin<1, disp('Usage: h = entropy(vec1).'); h = -1;else, [p1] = estpa(vec1); h = estentropy(p1);end;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -