MATLAB Release Notes    

Mathematics Features

MATLAB 6.5 adds the following mathematics features and enhancements:

These features are described below. At the end of this section are tables that summarize changes to the MATLAB math functions:

Delay Differential Equations

MATLAB now provides the capability to solve delay differential equations (DDEs) with constant delays. The DDE solver, dde23, provides an interface that is similar to the MATLAB ODE solver interface and is as easy to use. The supporting functions ddeset, ddeget, and deval enable you to set integration properties that affect problem solution and to evaluate the numerical solution obtained with dde23.

See Initial Value Problems for DDEs and the function descriptions in the MATLAB documentation for detailed information.

Singular Boundary Value ODE Problems

The function bvp4c can now solve a class of singular BVPs of the form

posed on an interval with . The bvpset function provides a new 'SingularTerm' integration property, which you can use to pass the constant matrix to bvp4c.

See Solving Singular BVPs and the function descriptions in the MATLAB documentation for more information.

Integration Over a Volume

A new function, triplequad, evaluates a triple integral that you provide as a function, fun(x,y,z), over a three dimensional rectangular region. As a default, triplequad uses the quadrature function quad to perform the integration. You can elect to use quadl instead or provide your own quadrature function.

Logarithmic Derivative of the Gamma Function

A new function psi evaluates the function, also known as the digamma function, for each element of an array X. You can also use psi to evaluate the kth derivative of , or a sequence of derivatives of different orders, at the elements of X.

Sparse, Square, Banded Matrix Left Division

Matrix left division (\) now uses banded solvers for X = A\b where A is sparse, square, and banded. Band density is defined as (# nonzeros in the band)/(# nonzeros in a full band). Band density = 1.0 if there are no zeros on any of the three diagonals.

If A is real and tridiagonal, i.e., band density = 1.0, and B is real with only one column, X is computed quickly using Gaussian elimination without pivoting.

If the tridiagonal solver detects a need for pivoting, or if A or B is not real, or if B has more than one column, but A is banded with band density greater than the new spparms parameter 'bandden' (default = 0.5, in the interval [0.0,1.0]), then X is computed using LAPACK.

Sparse Matrix LU Factorization and Solve

LU factorization and solve for sparse matrices now uses UMFPACK. UMFPACK is a set of routines for solving unsymmetric sparse linear systems, , using the Unsymmetric MultiFrontal method. It provides a considerable increase in computational speed for these matrices.

lu Function.   The lu function provides two new syntaxes for sparse matrices. These new syntaxes use UMFPACK for factorization.

The syntaxes return a unit lower triangular matrix L, an upper triangular matrix U, and permutation matrices P and Q, so that P*X*Q = L*U. The thresh argument (default = 0.1, in the interval [0.0,1.0]) controls pivoting.

\ (backslash).   Matrix left division (\) uses UMFPACK for square sparse matrices that are not banded. You can control pivoting with the new spparms parameter 'piv_tol' (default = 0.1, in the interval [0.0,1.0]).

Information about UMFPACK is available online at http://www.cise.ufl.edu/research/sparse/umfpack/. The UMFPACK Version 4.0 User Guide is available at http://www.cise.ufl.edu/research/sparse/umfpack/v4.0/UserGuide.pdf. Type help umfpack at the command line for summary copyright and licensing information.

Matrix Math Performance Improvements for Triangular Matrices

The speed for solving linear systems AX = B where A is upper or lower triangular, and B is an m-by-n matrix, has been improved through the use of optimized Basic Linear Algebra Subroutines (BLAS). Optimized BLAS is provided by Automatically Tuned Linear Algebra Software (ATLAS).

BLAS has also been used to improve certain matrix multiplication operations, i.e., matrix*vector, vector*matrix, and rowvector*columnvector.

For the first time, ATLAS BLAS have been tuned to the Pentium 4 under both Windows and Linux operating systems, resulting in improved speed for core linear algebra functions.

By making better use of cache, the speed of matrix transposition has been increased for all matrices, but particularly for matrices whose size is a power of 2.

Summary of New Functions

Function
Purpose
dde23
Solve initial value problems for delay differential equations (DDEs) with constant delays
ddeget
Extract properties from the options structure created with ddeset
ddeset
Create/alter a DDE options structure that contains solver integration properties
psi
Psi (polygamma) function, i.e., the logarithmic derivative of the gamma function
triplequad
Numerically evaluate triple integral

Summary of Changed Functions

Function
Enhancement or Change 
(slash)
(backslash)

Now use banded solvers for sparse, square, banded matrices. See Sparse, Square, Banded Matrix Left Division for more information.
Now use UMFPACK for left and right division of square sparse matrices that are not banded. See Sparse Matrix LU Factorization and Solve for more information.
(slash)
(backslash)

The result of dividing a singular lower or upper triangular matrix by any other matrix, using either left (\) or right (\) division, may change. Previously, for singular square matrices A for which rcond(A) = 0, the result was always a matrix of Infs. This change is a result of the performance improvements described above.
See Mathematics Upgrade Issues for examples.
bvp4c
bvpset

A new option 'SingularTerm' enables you to specify a matrix as the singular term of singular BVPs. Set this option to the constant matrix for equations of the form


corrcoef
Provides three new syntaxes:
[R,P] = corrcoef(...) returns P, a matrix of p-values for testing the hypothesis of no correlation.

[R,P,RLO,RUP] = corrcoef(...) returns matrices RLO and RUP which contain lower and upper bounds for a 95% confidence interval for each coefficient.

[...]=corrcoef(...,'param1',val1,'param2',val2,...) accepts parameter-value pairs that enable you to override the default confidence interval, and specify how to treat rows of X that contain NaNs.

deval
Now also accepts output from dde23
gallery
house

A new syntax [v,beta,s] = gallery('house',x,k) returns the norm of x. You can use the new argument k to control the sign of s.


leslie
gallery('leslie',a,b) returns the n-by-n Leslie matrix with average birth numbers a(1:n) and survival rates b(1:n-1).

orthog
gallery('orthog',n,k) adds a new type, k, of matrix. k = 6 specifies a symmetric matrix arising as a discrete cosine transform such that Q(i,j) = sqrt(2/n)*cos((i-1/2)*(j-1/2)*pi/n).

randsvd
For large dimensions, a new argument, method, enables you to specify an alternative method that is much faster for large dimensions even though it uses more flops.
legendre
A new syntax legendre(n,X,'norm') computes the fully normalized associated Lengendre functions .
lsqr
A new syntax [x,flag,relres,iter,resvec,lsvec] = lsqr(...) returns, in the vector lsvec, estimates of the scaled normal equations residual at each iteration.
lu
Uses UMFPACK to improve speed for factorization of sparse matrices, and to add two new syntaxes for sparse matrices.
[L,U,P,Q] = lu(X)
[L,U,P,Q] = lu(X,thresh)
The new output Q is the column permutation matrix that is used to reduce fill-in in the sparse case. P is the row permutation matrix that is used for numerical stability. The thresh argument controls pivoting. See Sparse Matrix LU Factorization and Solve for information about UMFPACK.
qrdelete
qrinsert
Two new syntaxes for each function provide for the deletion and insertion of rows, as well as columns, in a QR factorization:
[Q1,R1] = qrdelete(Q,R,j,'col')
[Q1,R1] = qrdelete(Q,R,j,'row')
[Q1,R1] = qrinsert(Q,R,j,x,'col')
[Q1,R1] = qrinsert(Q,R,j,x,'row')
The original syntaxes qrdelete(Q,R,j) and qrinsert(Q,R,j,x) default to 'col'.
spparms
Provides two new parameters for sparse matrix division.

'piv_tol'
Pivot tolerance used by the UMFPACK LU-based \ and /.

'bandden'
Band density used by LAPACK-based \ and / for banded matrices.


  Development Environment Features Programming and Data Types Features