File Exchange

image thumbnail

ami and correlation

version (31 KB) by Durga Lal Shrestha
Computes and plots average mutual information and correlation for time series data.


Updated 04 Apr 2016

View License

AMI computes and plots average mutual information (ami) and correlation of univariate or bivariate time series for different values of time lag.
[amis corrs] = ami(xy,nBins,nLags)

xy: either univariate (x) or bivariate ([x y]) time series data. If bivariate time series are given then x should be independent variable and y should be dependent variable. If univariate time series is given then autocorrelation is calculated instead of cross correlation.

nBins: number of bins for time series data to compute distribution which is required to compute ami. nBins should be either vector of 2 elements (for bivariate) or scalar (univariate).

nLags: number of time lags to compute ami and correlation. Computation is done for lags values of 0:nLags.

amis: vector of average mutual information for time lags of 0:nLags

corrs: vector of correlation (or autocorrelation for univariate time seris) for time lags of 0:nLags

xy = rand(1000,2);
nBins = [15 10];
nLags = 25;
[amis corrs]= ami(xy,nBins,nLags);

Cite As

Durga Lal Shrestha (2020). ami and correlation (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)


Nice work!Thanks

Harish Pandey

Hello Durga ji Namaskar,

Maile Mimo-OFDM ma fast fading channel ko lagi channel estimation gardaichu. Kehi idea ra kunnai saathi haru chan bhanne contact garaidinus. The job you have done here is very good job.

Roy Wilds

Useful and efficient.

salam chanawi

very good

salam chanawi

I want to calculate the correlation coefficient from a matrix of observations?
If you having idea??
Thank you.


BSD License

Updating description with spelling correction

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux