Transcript
Page 1: How to use Matrix Market matrices in Matlab

How to use Matrix Market matrices in Matlab

The Matrix Market is an interesting collection of matrices from a variety of applications

Page 2: How to use Matrix Market matrices in Matlab

Purpose

• To illustrate the use of Matrix Market matrices in Matlab

• To learn a bit about sparse matrices

• To use some of the tools available in Matlab for working with sparse matrices

Page 3: How to use Matrix Market matrices in Matlab

Preliminary Steps• Locate a matrix at the Matrix Market web site

math.nist.gov/MatrixMarket (see the “Introduction to the Matrix Market” tutorial)

• Download and uncompress a file describing the matrix (see the “Downloading matrices from the Matrix Market” tutorial)

• Load the matrix into Matlab (see “Converting Matrix Market matrices to Matlab” tutorial and this tutorial)

Page 4: How to use Matrix Market matrices in Matlab
Page 5: How to use Matrix Market matrices in Matlab

In Matlab we will illustrate

• The structure of sparse matrices (using spy)• Solving large linear systems (using \)• The time required (using tic and toc)• The accuracy of the calculated solution (using

norm and condest)• Fill-in in the factorization (using lu, nnz and spy)• The effect of column reordering on fill-in (using

colmmd, lu, nnz and spy)• The time required for the solution when sparsity is

not used (using full)

Page 6: How to use Matrix Market matrices in Matlab

The structure of sparse matrices

Page 7: How to use Matrix Market matrices in Matlab

Time and accuracy of solving a system of equations

Page 8: How to use Matrix Market matrices in Matlab

Non-zero structure of A

Page 9: How to use Matrix Market matrices in Matlab

Fill-in

Page 10: How to use Matrix Market matrices in Matlab

Fill-in

Page 11: How to use Matrix Market matrices in Matlab

Column reordering

Page 12: How to use Matrix Market matrices in Matlab
Page 13: How to use Matrix Market matrices in Matlab

The value of sparsity

Page 14: How to use Matrix Market matrices in Matlab

Other tutorials available at www.math.sjsu.edu/~foster

• Introduction to the Matrix Market

• Downloading matrices from the Matrix Market

• Converting Matrix Market matrices to Matlab format

• Iterative methods in Matlab with Matrix Market matrices


Top Related