File Exchange

image thumbnail


version (6.77 KB) by Nick Higham
Anderson acceleration of the alternating projections method for the nearest correlation matrix.


Updated 29 Jul 2016

From GitHub

View license on GitHub

MATLAB codes for Anderson acceleration for the alternating projections
method for the nearest correlation matrix problem, based on the paper
Nicholas J. Higham and Nataša Strabić. Anderson acceleration of the
alternating projections method for computing the nearest correlation
matrix. MIMS EPrint 2015.39, Manchester Institute for Mathematical
Sciences, The University of Manchester, UK, August 2015. 22 pp.

Cite As

Nick Higham (2021). higham/anderson-accel-ncm (, GitHub. Retrieved .

Comments and Ratings (4)

Nick Higham

For numbers of iterations and timings see the paper (which is the published version of the eprint quoted above).

Pavel Kuzmin

Can you help me? What is the difference in number of iterations and time between Anderson acceleration for APM and original APM?

Nick Higham

The comments say "If PATTERN is non-empty then the unit diagonal must be explicitly forced if required", so you have to provide a matrix with unit diagonal in that case.

This function is not intended for covariance matrices.

[1,1;1,1] is a correlation matrix, so is an acceptable output.

Pavel Kuzmin

How can I make this code work with my covariance matrix (not Correlation one)? However, it doesn't output with error, when I try to run it with, for example, [1,2;2,3], but it still doesn't work properly - it output with [1,1;1,1], which is obviously not appropriate for nearest covariance matrix problem. Lookin forward to your answer.

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!