OXFORD UNIVERSITY COMPUTING LABORATORY

Using the GUI with Dense matrices

See also Using the GUI with Sparse Matrices.
The software can be downloaded here.

When used for dense matrices, the GUI acts as a graphical front end to a fast MATLAB code for computing pseudospectra that evolved from Nick Trefethen's psa.m published in Computation of Pseudospectra. It automates the choice of many parameters such as axes, contour levels and number of grid points, as well as being efficient (by avoiding the re-computation of intermediate values between calls) if the pseudospectra are redrawn (for example when choosing a finer grid or zooming in). Once the initial pseudospectra have been calculated, further computation within the GUI takes O(N2v2) time for a v-by-v grid.

A list of available options is given below; they can be used separately or in any combination.
OptionDefault valueMeaning
opts.nptsproblem dependent, 15..80 Number of gridpoints to use (see Documentation: Mesh).
opts.levelsproblem dependentEpsilon levels (logs base 10).
opts.axproblem dependentAxes.
opts.proj_levInfAmount of projection to use (see Documentation: Projection).
opts.colour1 Draw the pseudospectra using coloured lines? 1 = colour, 0 = b/w.
opts.thick_lines1 Draw the pseudospectra using thick lines? 1 = thick, 0 = thin; other values (only used for printed plots) are defined by interpolation
opts.scale_equal1 Start with the axis scale equal or not. 1 = equal, 0 = unequal.
opts.print_plot0Run the GUI and create a printable plot only (i.e. no interaction)
opts.no_graphics0Run the GUI and create output singular value data only
opts.no_waitbar01 = do not display any waitbars, 0 = display waitbars when computing.
opts.isrealproblem dependentComplex problems can arise from real ones (for example with a Schur decomposition). Set this option to 1 if you are inputting a complex matrix which is similar to a real one. This will allow the pseudospectra to be mirrored across the x-axis, saving compute time. If the input matrix is real, the GUI will detect this automatically.
opts.ewsproblem dependentVector containing the eigenvalues of a rectangular or sparse matrix (not computed by default within the GUI.
opts.dim0Display the dimension of the matrix at the bottom left hand corner of the axes? 1 = yes, 0 = no.
opts.grid0Display the grid used to compute the pseudospectra on? 1 = yes, 0 = no.
opts.no_ews0Suppress display of eigenvalues in plots? 1 = yes, 0 = no.
opts.fov0Display the field of values? 1 = yes, 0 = no.
opts.unitary_mtx[]A unitary transformation to apply to eigenmodes and pseudoeigenmodes before displaying
opts.assign_output0Set variables in the base workspace? This is needed to obtain output from EIGS; the variables are psa_output_x, psa_output_y and psa_output_Z. 1 = yes, 0 = no.

To use the GUI in this way, simply set the options desired (if any), then call the function psa. Full documentation of the operation of the GUI once it has been started is available.

Examples

To compute the pseudospectra of a matrix A using the default settings:

N = 10; c = [1 1 ./ cumprod(1:N)]; A = compan(fliplr(c)); % Generate the matrix
psa(A); % Call the GUI for matrix A

To set some options then call the GUI (e.g. `Smoke matrix' of dimension 64):

clear opts; % Clear this variable in case it is in use already
A = gallery('smoke',64); % Use one of the built-in MATLAB matrices
opts.levels = -8:-1; % Plot contours at epsilon = 10-8,10-7,...,10-1
opts.npts = 20; % Use a grid of size 20 by 20 for the pseudospectra computation
psa(A,opts); % Call the gui with the matrix and these opts

The GUI can also be called with no input arguments, in which case it will start and then wait for a matrix to be entered.


Pseudospectra GUI home page.


[Oxford Spires]



Oxford University Computing Laboratory Courses Research People About us News