- Compute the joint probability matrix ‘p’ for vector ‘x’ and vector ‘y’. If you don't have the probability matrix, You can use the MATLAB ‘histcounts2’ function, to generate the probability matrix.
- Flatten the probability matrix.
- Remove the zero probabilities.
- Calculate the Entropy Using Shannon's Entropy Formula.
- https://www.mathworks.com/matlabcentral/answers/436929-how-to-find-entropy-of-x
- https://www.mathworks.com/matlabcentral/answers/42142-entropy-of-a-signal