**usa_matrix**,
a Python code which
defines the adjacency matrix for US states,
using a variety of matrix formats.

The computer code and data files made available on this web page are distributed under the GNU LGPL license.

**usa_matrix** is available in
a MATLAB version and
an Octave version and
a Python version.

jordan_matrix, a Python code which returns a random matrix in Jordan canonical form.

levenshtein_matrix, a Python code which returns the Levenshtein distance matrix defined by two strings.

monopoly_matrix, a Python code which computes the adjacency and transition matrices for the game of Monopoly.

plasma_matrix, a Python code which sets up a matrix associated with a problem in plasma physics.

risk_matrix, a Python code which computes the transition and adjacency matrix for the game of RISK.

snakes_matrix, a Python code which computes the transition matrix for Snakes and Ladders.

sparse_test, a Python code which illustrates the use of the sparse matrix utilities;

test_matrix, a Python code which defines test matrices for which the condition number, determinant, eigenvalues, eigenvectors, inverse, null vectors, P*L*U factorization or linear system solution are known. Examples include the Fibonacci, Hilbert, Redheffer, Vandermonde, Wathen and Wilkinson matrices.

wathen_matrix, a Python code which compares storage schemes (full, banded, sparse triplet, sparse) and solution strategies (A\x, linpack, conjugate gradient (CG)) for linear systems involving the Wathen matrix, which can arise when solving a problem using the finite element method (FEM).

web_matrix, a Python code which stores sample matrices describing a web page network. These matrices are typically very sparse, and the examples here are stored using the sparse triplet (ST) format. They can be used to demonstrate pagerank and other graph algorithms.

wishart_matrix, a Python code which produces sample matrices from the Wishart or Bartlett distributions, useful for sampling random covariance matrices.

- usa_matrix.py, the source code.
- usa_matrix.sh, runs all the tests.
- usa_matrix.txt, the output file.

- usa_coo.png, a spy() plot of the usa_coo() matrix.
- usa_ge.png, a spy() plot of the usa_ge() matrix.
- usa_st.png, a spy() plot of the usa_st() matrix.