# NewMat C++ Matrix Class

*Robert Davies*

C/C++ codes

**Abstract:**
Newmat is intended for scientists and engineers who need to manipulate a variety of types of matrices using standard matrix operations. Emphasis is on the kind of operations needed in statistical calculations such as least squares, linear equation solve and eigenvalues. It supports matrix types Matrix (rectangular matrix), nricMatrix (variant of rectangular matrix as an interface to "Numerical Recipes"), UpperTriangularMatrix, LowerTriangularMatrix, DiagonalMatrix, SymmetricMatrix, BandMatrixi, UpperBandMatrix, LowerBandMatrix, SymmetricBandMatrix, RowVector, ColumnVector. The package includes the operations *, +, -, inverse, transpose, conversion between types, submatrix, determinant, Cholesky decomposition, Householder triangularisation, singular value decomposition, eigenvalues of a symmetric matrix, sorting, fast fourier transform, printing and an interface with "Numerical Recipes in C". It is intended for matrices in the range 15 x 15 to the maximum size your machine will accomodate in a single array. For example 90 x 90 (125 x 125 for triangular matrices) in machines that have 8192 doubles as the maximum size of an array. The number of elements in an array cannot exceed the maximum size of an "int". The package will work for very small matrices but becomes rather inefficient. A two-stage approach to evaluating matrix expressions is used to improve efficiency and reduce use of temporary storage. The file newmatnl.tar.gz contains an extension to the nonlinear optimisation class for maximum likelihood estimation, an example is included where a GARCH(1,1) regression model is estimated. newran.tar.gz contains a class for generating pseudo-random numbers from different distributions. It is required by the GARCH example. Version 09 was released in October 1997.

**Language:** C++

**Requires:** The package is designed for version 2 or 3 of C++. It works with Borland (3.1 & ,4.0) and Microsoft (7 & 8) and Watcom (10) C++ on a PC and AT&T C++ (2.1 & 3) and Gnu C++ (2.3.3 & 2.5.8). It works with some problems with Zortech C++ (version 3.04)

**References:** Add references at CitEc

**Citations:** Track citations by RSS feed

**Downloads:** (external link)

http://www.robertnz.net/ftp/newmat10.tar.gz Source code for NewMat10

http://www.robertnz.net/ftp/newmat10.tar.gz Source code for NewMat10

**Related works:**

This item may be available elsewhere in EconPapers: Search for items with the same title.

**Export reference:** BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text

**Persistent link:** https://EconPapers.repec.org/RePEc:cod:ccplus:newmat

Access Statistics for this software item

More software in C/C++ codes

Bibliographic data for series maintained by Christopher F. Baum ().