Skip to content

This project provides two MATLAB functions, myarnoldi.m and myarnoldiro.m, for efficient and accurate extraction of a few eigenpairs from large, sparse matrices. It includes key features like sparse matrix support, error analysis, and testing on real-world data, making it a valuable tool for eigenvalue computations.

Notifications You must be signed in to change notification settings

timhwang777/arnoldi-matlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Arnoldi with MATLAB

matlab-badge

Table of Contents

About the project

This project introduces two MATLAB functions designed to extract a few eigenpairs from large-scale matrices, focusing on efficiency and accuracy. The functions are:

myarnoldi.m: Implements the Arnoldi method for eigenvalue computation.
myarnoldiro.m: Enhances the Arnoldi method by incorporating reorthogonalization to improve numerical stability and accuracy.

Key Features

  • Sparse Matrix Support: Utilizes MATLAB's sparse matrix capabilities to efficiently handle large-scale problems.
  • Demonstration with west0479 Matrix: The correctness of the implemented methods is verified using west0479, a MATLAB sparse demonstration matrix, showcasing the functions' ability to accurately compute eigenvalues and eigenvectors.
  • Residuals Computation: Calculates residuals to ensure the accuracy of the computed eigenpairs, with expectations of achieving machine precision for small iteration counts (e.g., 20, 40).
  • Ritz Values Computation: Involves computing and plotting Ritz values against the exact eigenvalues of the matrix to visually verify the effectiveness of the Arnoldi processes.
  • Error Analysis: Employs relative error analysis for the top three largest eigenvalues, illustrating the convergence behavior and the benefits of reorthogonalization through iteration-based plots.
  • Large Matrix Testing: Extends the validation to large matrices from the "SuiteSparse Matrix Collection," demonstrating the methods' scalability and efficiency on real-world datasets. Shift-and-Invert Spectral Transformation: Incorporates a shift-and-invert strategy in the reorthogonalized Arnoldi method to target eigenvalues near a specified value, enhancing the method's utility for specific applications.

Environment Setup

To successfully run the provided MATLAB functions and test the algorithms with your matrices, follow these setup instructions carefully. This guide assumes you have MATLAB installed. If not, please visit the official MATLAB website to download and install MATLAB before proceeding.

The project uses west0479, a sparse demonstration matrix included in MATLAB, as a primary example for testing. To load this matrix into your workspace, execute the following commands in the MATLAB Command Window:

load west0479;
A = west0479;

Author

Timothy Hwang

About

This project provides two MATLAB functions, myarnoldi.m and myarnoldiro.m, for efficient and accurate extraction of a few eigenpairs from large, sparse matrices. It includes key features like sparse matrix support, error analysis, and testing on real-world data, making it a valuable tool for eigenvalue computations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published