⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 condmutualinfo.m

📁 多变量的互信息的matlab的函数的源码
💻 M
字号:
function h = condmutualinfo(vec1,vec2,condvec)%=========================================================%%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 = condmutualinfo(vec1,vec2,condvec)% calculate the mutual information of two vectors given the condvec%% if condvec is empty of nargin<3, then equals to mutualinfo.m%% example:%  a=[1 2 1 2 1]';b=[2 1 2 1 1]';c=[2 1 2 2 1]'; %  condmutualinfo(a,b,c)%  condmutualinfo(a,b,[c c])%  condmutualinfo(a,b,[c a])%  condmutualinfo(b,a,c)%  condmutualinfo(b,a)   %% By Hanchuan Peng, April/2002%if nargin<3,  condvec = [];end;if size(condvec,2)>1,  newcondvec_z = mergemultivariables(condvec);else %including the case of condvec=[]  newcondvec_z = condvec;end;if isempty(newcondvec_z),  h = condentropy(vec2) - condentropy(vec2,vec1);else  newcondvec_xz = mergemultivariables(newcondvec_z,vec1);  h = condentropy(vec2,newcondvec_z) - condentropy(vec2,newcondvec_xz);end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -