Fisher Information and Shannon Entropy
Version 1.0.0 (2.06 KB) by
Tsung-Hsi Wu
Calculate Fisher Information [∫(∂f(x)/∂x)^2*dx/f(x)] and Shannon Entropy [∫ - p(x) * log(p(x)) * dx].
Calculate Fisher Information [∫(∂f(x)/∂x)^2*dx/f(x)] and Shannon Entropy [∫ - p(x) * log(p(x)) * dx].
Example:
shannonentropy(data)
fisherinformation(data)
Hints:
data has to be column vector (N by 1)
Modify 'MaxIntervalCount' or 'AbsoluteTolerance' (maybe 'RelativeTolerance' in quadgk) if it is too slow.
Cite As
Tsung-Hsi Wu (2026). Fisher Information and Shannon Entropy (https://www.mathworks.com/matlabcentral/fileexchange/154642-fisher-information-and-shannon-entropy), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2021b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
