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

📄 entropy.m

📁 contemporarycommunicatonsystem-using MATLAB经典书目源程序!
💻 M
字号:
function h=entropy(p)%		H=ENTROPY(P) returns the entropy function of %		the probability vector P.if length(find(p<0))~=0,  error('Not a prob. vector, negative component(s)')endif abs(sum(p)-1)>10e-10,  error('Not a prob. vector, components do not add up to 1')endh=sum(-p.*log2(p));

⌨️ 快捷键说明

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