Back to Core Functions
gallery
Test matrices by name
Syntax
A = gallery(matname) A = gallery(matname, n) A = gallery(matname, n, ...)
Description
Generates test matrices useful for testing numerical algorithms. The first argument is a string specifying the matrix type. Available types include: 'hilb' (Hilbert), 'invhilb' (inverse Hilbert), 'pascal', 'magic', 'lehmer', 'minij', 'moler', 'pei', 'kms', 'cauchy', 'circul', 'fiedler', 'tridiag', 'frank', 'grcar', 'hanowa', 'jordbloc', 'clement', 'triw', 'parter'.
Parameters
| Name | Description |
|---|---|
| matname | Name of the test matrix type (string) |
| n(optional) | Size or first parameter (depends on matrix type) |
| ...(optional) | Additional parameters (depends on matrix type) |
Returns
Test matrix of the specified type