Feel free to download and use (at your own risk!)
any of the following matlab functions and
scripts. If you want to contribute some of your
M-files or have other suggestions, please
This page is linked from the portal
Last updated: Apil 9, 2014
To download, hold the SHIFT key down when
you click on the filenames.
Finds the strongly connected components of the directed graph
of a matrix.
Uses dig.m to find the Frobenius normal form of a matrix.
Finds the Principal Pivot Transform of a matrix relative to a
See Principal Pivot Transforms: Properties and
Given a positive integer k in decimal form, it generates vectors d, b,
whose entries are the digits of the decimal and binary representations
of k, respectively.
Finds, if possible, a diagonal matrix
D such that AD is strictly row diagonally dominant.
In other words, check if A is an H-matrix or not.
This is achieved using Algorithm H found in
An Iterative Criterion for H-matrices.
Draws the (boundary of the) numerical range of a matrix.
Checks if a (complex) matrix is P (i.e., if all its
principal minors are positive) or not. Uses a recursive algorithm
found in A Recursive Test
[ ptest3.m is an improvement upon the original
ptest.m which was designed to
test real matrices only and was much slower.]
Draws the "shell" of an almost skew-symmetric matrix.
It needs spectrum.m.
An almost skew-symmetric matrix is a matrix whose
symmetric part has rank one. Its shell is a curve in the
complex plane that localizes the spectrum. This M-file
draws the shell and plots the eigenvalues. Such
matrices are studied in a recent paper by Panos Psarrakos,
Judi McDonald and myself. Request a
Generates a "random" tournament matrix.
Simple file to plot the spectrum of a matrix.
Finds a Schur complement.
Principal Minor Computation and Assignment
This is a page with links to (p)re-prints and Matlab source code related
(1) to the computation of all principal minors of a matrix and (2) to
the Principal Minor Assignment Problem.
Finds the Envelope of a matrix, which is a region in the complex plane that
contains the spectrum. See my work with Panos Psarrakos for the definition
and properties of the Envelope.
Some other useful M-files: