Code covered by the BSD License  

Highlights from
Fast mutual information of two images or signals

from Fast mutual information of two images or signals by Jose Delpiano
Optimized function for mutual information of two images or signals

mi_test.m
disp('Test: Mutual information between two images')
load mri 
A=D(:,:,8); 
B=D(:,:,9);
mi(A,A),mi(A,B)

disp('Test: Mutual information between two signals')
load garchdata
nasdaq = price2ret(NASDAQ);
nyse = price2ret(NYSE);
mi(nasdaq,nasdaq), mi(nasdaq,nyse)

Contact us at files@mathworks.com