Skip to content

Commit

Permalink
Showcase project enhancements for GitHub publication: Updated project…
Browse files Browse the repository at this point in the history
… demonstration and documentation to highlight features and usability improvements.
  • Loading branch information
timhwang777 committed Feb 19, 2024
0 parents commit a1ddffe
Show file tree
Hide file tree
Showing 46 changed files with 1,812 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Arnoldi with MATLAB
![matlab-badge](https://img.shields.io/badge/MATLAB-Solutions-blue
)

## Table of Contents
- [About the Project](#about-the-project)
- [Key Features](#key-features)
- [Environment Setup](#environment-setup)
- [Author](#author)

## 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:
```matlab
load west0479;
A = west0479;
```
## Author
Timothy Hwang
Binary file added figure/arnoldi1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/arnoldi2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/arnoldi3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/arnoldi4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/relerr_compare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task61fig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task62fig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task71.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task71relerr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task72relerr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task73.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task73c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task73relerr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task811resi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task81resi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task822resi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/task82resi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/report.pdf
Binary file not shown.
Loading

0 comments on commit a1ddffe

Please sign in to comment.