Entropy

Calculates the sample entropy, in bits, of discrete variables.

You are now following this Submission

Entropy: Returns entropy (in bits) of each column of 'X'

by Will Dwinnell

H = Entropy(X)

H = row vector of calculated entropies (in bits)
X = data to be analyzed

Note 1: Each distinct value in X is considered a unique value.

Note 2: Estimated entropy values are slightly less than true,
due to finite sample size.

Example:

X = ceil(repmat([2 4 8 16],[1e3,1]) .* rand(1e3,4));
Entropy(X)

Cite As

Will Dwinnell (2026). Entropy (https://www.mathworks.com/matlabcentral/fileexchange/28692-entropy), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0