Matlab codes

Disclaimer. The MATLAB programs that are made available on this page are offered as is and without any guarantees. The programs are not optimized in any manner nor are they intended to be perfect. Use them at your own risk.

The codes are provided for educational purposes only, and they are meant to illustrate some of the research results generated by our group. In order to keep the codes at a level that is easy to understand by students, we have often sacrificed performance in lieu of simplicity.

If you use any of the programs for educational purposes, please acknowledge the source (UCLA Adaptive Systems Laboratory). The programs cannot be used for commercial purposes.

Acknowledgment. We gratefully acknowledge the support of the US National Science Foundation under various grants. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the sponsor. The support and funding statements included in the references listed below indicate the grant numbers of the research projects under which the software codes and the relevant theory were developed.

Acknowledgement. MathWorks Inc., 24 Prime Park Way, Natick, MA 01760-1500, USA.

© All rights reserved.

Code for Distributed Dictionary Learning


Supported in part by NSF grants CCF-1011918 and EECS-1407712.


  • J. Chen, Z. J. Towfic, and A. H. Sayed, “Dictionary learning over distributed models,” IEEE Trans. Signal Process. vol. 63, issue 4, pp. 1001-1016, February 2015. [pdf] [arXiv]

Code for Diffusion Strategies, Adaptive Networks, Biological Networks





Supported in part by:
NSF grants ECS-0601266, ECS-0725441, CCF-0942936, and CCF-1011918.

Source of images: wikimedia commons


  • A. H. Sayed, S.-Y. Tu, J. Chen, X. Zhao, and Z. Towfic, “Diffusion strategies for adaptation and learning over networks,” IEEE Signal Processing Magazine, vol. 30, no. 3, pp. 155-171, May 2013. [pdf]
  • A. H. Sayed, “Diffusion adaptation over networks,” in Academic Press Library in Signal Processing, vol. 3, R. Chellapa and S. Theodoridis, editors, pp. 323-454, Academic Press, Elsevier, 2014. Also available as arXiv:1205.4220 [cs.MA], May 2012. [pdf]
  • A. H. Sayed, “Adaptive networks,” Proceedings of the IEEE, vol. 102, no. 4, pp. 460-497, Apr. 2014. [pdf]
  • A. H. Sayed, “Adaptation, learning, and optimization over networks,” Foundations and Trends in Machine Learning, vol. 7, issue 4-5, pp. 311-801, NOW Publishers, Boston-Delft, July 2014. [pdf]
  • S-Y. Tu and A. H. Sayed, “Mobile adaptive networks,” IEEE J. Selected Topics in Signal Processing, vol. 5, no. 4, pp. 649-664, Aug. 2011. [pdf]
  • S-Y. Tu and A. H. Sayed, “Cooperative prey herding based on diffusion adaptation,” Proc. ICASSP, Prague, Czech Republic, pp. 3752-3755, May 2011. [pdf]
  • F. Cattivelli and A. H. Sayed, “Modeling bird flight formations using diffusion adaptation,” IEEE Trans. Signal Process., vol. 59, no. 5, pp. 2038-2051, May 2011. [pdf]
  • F. Cattivelli and A. H. Sayed, “Diffusion strategies for distributed Kalman filtering and smoothing,” IEEE Trans. Aut. Control, vol. 55, no. 9, pp. 2069-2084, Sep. 2010. [pdf]
  • F. Cattivelli and A. H. Sayed, “Diffusion LMS strategies for distributed estimation,” IEEE Trans. Signal Process., vol. 58, no. 3, pp. 1035-1048, Mar. 2010. [pdf]
  • C. G. Lopes and A. H. Sayed, ”Diffusion least-mean squares over adaptive networks: Formulation and performance analysis,” IEEE Trans. Signal Process., vol. 56, no. 7, pp. 3122-3136, July 2008. [pdf]

Code for Adaptive Filtering Projects


Supported in part by:
NSF grants CCR-9734290, ECS-9820765, CCF-0280573, ECS-0401188, ECS-0601266, ECS-0725441.


  • A. H. Sayed, Adaptive Filters, John Wiley & Sons, NJ, ISBN 978-0-470-25388-5, xxx+786pp, 2008.
  • Download MATLAB programs for solving all computer projects.
  • Download plots and solutions for all computer projects.

Code for Regularized Robust Estimation


Supported in part by:
NSF grants MIP-9409319, MIP-9796147, CCR-9734290, ECS-9820765.


  • A. H. Sayed, “A framework for state-space estimation with uncertain models,” IEEE Trans. Aut. Control, vol. 46, no. 7, pp. 998-1013, July 2001. [pdf]
  • A. H. Sayed, V. H. Nascimento, and S. Chandrasekaran, “Estimation and control with bounded data uncertainties,” Linear Algebra and Its Applications, vol. 284, pp. 259-306, Nov. 1998. [pdf]
  • A. H. Sayed, V. H. Nascimento, and F. A. M. Cipparrone, “A regularized robust design criterion for uncertain data,” SIAM J. Matrix Analysis and Applications, vol. 23, no. 4, 1120-1142, 2002. [pdf]
  • S. Chandrasekaran, G. Golub, M. Gu, and A. H. Sayed, “Parameter estimation in the presence of bounded data uncertainties,” SIAM. J. Matrix Anal. Appl., vol. 19, no. 1, pp. 235-252, Jan. 1998. [pdf]
  • S. Chandrasekaran, G. Golub, M. Gu, and A. H. Sayed, “Parameter estimation in the presence of bounded modeling errors,” IEEE Signal Processing Letters, vol. 4, no. 7, pp. 195-197, July 1997. [pdf]