Code covered by the BSD License  

Highlights from
Symmetric eigenvalue decomposition and the SVD

5.0

5.0 | 2 ratings Rate this file 38 Downloads (last 30 days) File Size: 5.68 KB File ID: #36830
image thumbnail

Symmetric eigenvalue decomposition and the SVD

by

 

Eigendecomposition of a symmetric matrix or the singular value decomposition of an arbitrary matrix

| Watch this File

File Information
Description

This submission contains functions for computing the eigenvalue decomposition of a symmetric matrix (QDWHEIG.M) and the singular value decomposition (QDWHSVD.M) by efficient and stable algorithms based on spectral divide-and-conquer. The computed results tend to be more accurate than those given by MATLAB's built-in functions EIG.M and SVD.M.

Function TEST.M runs a simple test of the codes.

Details on the underlying algorithms can be found in

Y. Nakatsukasa and N. J. Higham. Stable and Efficient Spectral Divide and Conquer Algorithms for the Symmetric Eigenvalue Decomposition and the SVD. MIMS EPrint 2012.52, The University of Manchester, May 2012.
http://eprints.ma.man.ac.uk/1824

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
04 Feb 2014 Yuji Nakatsukasa

Dear Uri,
While I am happy to see your comment, that sounds surprising (my code often gives better accuracy, but the MATLAB built-in svd, eig, schur are also all backward stable and robust). Could you say more about how the built-in functions failed?

12 Jan 2014 Uri Cohen

Worked brilliently for me, where the built-in svd, eig and schur have failed completely!

26 Oct 2013 Il  
19 Dec 2012 Yuji Nakatsukasa

Dear saitarun,
The code qdwheig.m is designed to work only for real symmetric or complex Hermitian matrices. For eigenvalue problems with nonsymmetric matrices I suggest simply using MATLAB's built-in command eig.

19 Dec 2012 saitarun reddy

I am trying to code the eigen value decomposition for a non-symmetric matrix and i end up getting complex eigen values. Can anyone help me on this?

Thanks.

19 Oct 2012 Yuji Nakatsukasa

Dear Henc,
Many apologies for the delay, I did not notice your comment until now. Regarding row sorting, yes it is a valid option and you can use it when the rows of the matrix have widely varying norms. However there is no theory to support its use (if both column pivoting and row sorting is used the QDWH algorithm can be shown to give backward stable results; however in practice pivoting/sorting is not necessary, and not recommended for speed).

27 Jul 2012 Henc

Yuji,

Sorry, please ignore (2) in my previous comment.

Henc

27 Jul 2012 Henc

Hello Yuji,

I have a few questions/comments.

(1) Your code for qdwh.m provides options for column pivoting and row sorting and your usage comments indicate that you can have either one of: 'rc', 'c', or '' such that you have both row sorting and column pivoting, only column pivoting, or none, respectively. However, within the code your use strfind and it seems that you could also have simply 'r' for row sorting only. Is this a valid option as well?

(2) Within qdwh.m, if row sorting is enabled, I believe that the if statement which performs the row sorting should also contain the following: Uprev = U; since you have changed U and then when you jump into the while loop, your check of norm(U-Uprev, 'fro') would most often be greater than tol3.

Thank you for your submission,
Henc

Contact us