Yields p value of the max value of a cross correlation by estimating what fraction of random permutations of one of the vectors yields a correlation equal or higher.
Alex Backer (2023). xcorrpvalue (https://www.mathworks.com/matlabcentral/fileexchange/75403-xcorrpvalue), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
This version accounts for the autocorrelation of either input series, preserving both in the random permutations, yielding the probability that any observed cross-correlation is not due to the autocorrelation of either input series.
Fixed bug that ignored input numvalues if provided.
Changed to use absolute value, so it detects negative correlations as well