A tool for comparing the spectra of two matrices, e.g., the eigenvalues of a matrix and its preconditioned form. Six ways of plotting them are shown, pick whichever one best shows the features you want. This assumes the eigenvalues come from real-valued matrics. In that case the eigenvalues for a matrix occur in conjugate pairs. I.e., if x + iy is an eigenvalue, so is x - iy. In that case only the upper plane for one matrix and the lower plane for the second matrix need be plotting, helping reduce the amount by which they overlay each other. For real-valued eigenvalues, they overlap unfortunately. If one or both of the matrices have almost all real-valued eigenvalues, then this is not so useful and you're better off to use a standard eigenvalue versus eigenvalue number plot, with two curves, one for each matrix. Randall Bramley Department of Computer Science Indiana University, Bloomington Started : 23 Oct 1997, 05:38 AM Modified : Thu 08 May 2008, 06:28 PM Last Modified: Mon 09 Mar 2009, 11:37 AM ======= Files: ======= A_eigenvalues.mat B_eigenvalues.mat Two binary files with the eigenvalues of one matrix each: eigenvalue_plot.m The main function. This demonstrates more techniques, esp. using polar plots and how to create a multiline text object using cells. Also, how to use graphics handles to get finer control over text and placement (see the legend() commands in the file). Read this file carefully - small things like the use of cells for multiline text are embedded, but unlike that example are not commented upon. Without the comments lines before that multiline cell, would you have even noticed that braces {} where used instead of parentheses () or brackets [] ? ------------------------------------ Small drivers for the main function ------------------------------------ evdriver.m compare.m