MATLAB Release Notes |
Mathematics Features
The following mathematics features have been added or enhanced in MATLAB 6.0:
These features are described below. At the end of this section are tables that summarize changes to the MATLAB math functions:
See Upgrading from an Earlier Release for information about obsolete functions.
Matrix Math in MATLAB 6.0
Matrix computations in MATLAB 6.0 are based on LAPACK, a large, multiauthor Fortran subroutine library for numerical linear algebra. LAPACK extends the MATLAB matrix computation capabilities and increases its speed on larger problems. It offers MATLAB a larger class of algorithms from which to choose based on the properties of the matrix arguments. Optimized Basic Linear Algebra Subroutines (BLAS), on all MATLAB platforms, speeds up matrix multiplication and the LAPACK routines themselves. Optimized BLAS is provided by Automatically Tuned Linear Algebra Software (ATLAS).
The LAPACK Users' Guide, Third Edition, is available online at http://www.netlib.org/lapack/lug/lapack_lug.html.
Differing Results. Matrix functions in earlier versions of MATLAB continue to operate in the same way in MATLAB 6.0, but the results they return may differ. Changes in roundoff errors can be seen in most matrix computations. In cases where quantities are not uniquely determined mathematically, results may differ in order and in normalization.
rcond
is a better estimate of the reciprocal condition.
lu
can now be used to factor rectangular full matrices.
Increased Number of Eigenvalue Algorithms. With MATLAB 6.0, there are now eight different eigenvalue algorithms, determined by
eig(A)
or eig(A,B)
B
, if any, positive definite
For the symmetric and Hermitian problems, the eigenvalues are real, sorted in increasing order and the eigenvectors are normalized so that
New Decompositions for Real Matrices. The QZ algorithm returns a newly available real decomposition for real matrices. If A
and B
are real and not symmetric,
returns a real triangular matrix BB
and a real quasitriangular matrix AA
with 2-by-2 diagonal blocks corresponding to pairs of complex conjugate eigenvalues. Earlier versions of MATLAB produced complex triangular AA
and BB
if there were any complex eigenvalues. You can continue to obtain this behavior with either
A similar option for the Schur decomposition of a real matrix
produces a complex decomposition if A
has any complex eigenvalues.
The flops Function. The incorporation of LAPACK makes it impractical to count floating-point operations. As a result, the flops
function is inoperative in MATLAB 6.0. It will be discontinued completely in some future version.
With modern computer architectures, floating-point operation counts are no longer a good predictor of execution time. Counts of memory references and cache usage patterns have become more important.
N-Dimensional Delaunay-Type Functionality
New Qhull-based functions extend Delaunay-type functionality:
delaunayn
and delaunay3
for N-dimensional Delaunay tessellation
convhulln
N-dimensional convex hull
voronoin
for N-dimensional Voronoi diagrams
griddatan
and griddata3
for data gridding and hyper-surface fitting
Differential Equation Solvers
New differential equation solvers expand the capabilties of MATLAB:
bvp4c
solves two-point boundary value problems for ODEs by collocation. Supporting functions enable you to set options that affect problem solution, form an initial guess, and evaluate the numerical solution obtained with bvp4c
.
pdepe
solves initial-boundary value problems for parabolic-elliptic PDEs in 1-D. A supporting function enables you to evaluate the numerical solution obtained with pdepe
.
The ODE solvers now take advantage of function handles and can solve problems without using ODE files. The new syntax is
where @odefun
, tspan
and y0
are required arguments. See the ODE solver and odeset
reference pages for details.
MATLAB 6.0 supports use of an ODE file for backwards compatibility, but new functionality is available only with the new syntax.
Sparse Matrix Computations
New and upgraded routines provide new capabilities and speed up computations:
eigs
and svds
now use the Fortran library ARPACK.
symmlq
, minres
and lsqr
, iteratively solve symmetric indefinite systems and least squares problems.
colamd
and symamd
, provide approximate minimum degree permutations to help reduce the fill-in of their sparse factors.
condest
can now produce more accurate condition estimates.
Fast Fourier Transforms
Fast Fourier transform (FFT) functions now rely on the MIT FFTW library. This results in faster performance for composite, prime, and large prime factor array lengths.
Quadrature
New quadrature algorithms in quad
and the new function quadl
are faster, more accurate and more robust in that they handle singularities better. quadl
replaces the now obsolete quad8
function.
Interpolation
A new one-dimensional interpolation function, pchip
, based on piecewise cubic Hermite interpolating polynomials, preserves the shape and monotonicity of the underlying data.
Function Functions
All function functions are now capable of accepting function handles as arguments. Most also accept additional parameters, which they pass to the function that you pass in as an argument.
For information about function handles, see the function_handle
(@
), func2str
, and str2func
reference pages, and the Function Handles section of "Programming and Data Types" in the MATLAB documentation.
The Basic Fitting Interface
MATLAB supports curve fitting through the Basic Fitting interface. Using this interface, you can quickly perform many curve fitting tasks within the same easy-to-use environment. The interface is designed so that you can
Depending on your specific curve fitting application, you can use the Basic Fitting interface, the command line functionality such as polyfit
and polyval
, or both.
The Data Statistics Interface
MATLAB has a new visual interface that:
When you select Data Statistics from the MATLAB figure window Tools menu, MATLAB calculates the statistics for each data set plotted in the graph and displays the results in a Data Statistics dialog box. To plot a statistic in a graph, click in the check box next to its value. To save a set of statistics as a workspace variable, click on the Save to workspace... button. The Data Statistics tool saves the statistics as a structure. The following figure shows the components of this dialog box.
Math Function Summary Tables
For more information on these functions, see their respective reference pages or type
in the MATLAB command window, where function
is the name of the function about which you want to obtain more information.
Note See Upgrading from an Earlier Release for information about obsolete functions. |
Function |
Purpose |
|
Solve two-point boundary value problems (BVPs) for ODEs by collocation |
|
Extract an option from the BVP options structure |
|
Form the initial guess for bvp4c |
|
Create/alter BVP options structure |
|
Evaluate the solution computed by bvp4c |
|
Column approximate minimum degree permutation |
|
N-dimensional convex hull |
|
Three-dimensional Delaunay tessellation |
|
N-dimensional Delaunay tessellation |
|
N-dimensional nearest point search |
|
Data gridding and hyper-surface fitting for 3-D data |
|
Data gridding and hyper-surface fitting (dimension >= 2) |
|
LSQR implementation of Conjugate Gradients on the Normal Equations |
|
Solve a system of equations using Minimum Residual Method |
|
Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) - preserves monotonicity and the shape of the data. pchip is used by interp1(x,y,xi,'cubic') |
|
Solve initial-boundary value problems for parabolic-elliptic partial differential equations (PDEs) in one dimension |
|
Evaluate by interpolation the solution computed by pdepe |
|
Numerically evaluate an integral using adaptive Lobatto quadrature |
|
Symmetric approximate minimum degree permutation |
|
Solve a system of equations using symmetric LQ method |
|
Compute N-dimensional Voronoi diagram |
Function |
Purpose |
|
[c,v] = condest(A,t) specifies a new argument, t, a positive integer equal to the number of columns in an underlying iteration matrix. Increasing the number of columns usually gives a better condition estimate but increases the cost. The default is t = 2 , which almost always gives an estimate correct to within a factor 2. |
|
dblquad now accepts extra arguments p1,p2,... which it passes to fun . For example, |
|
For symmetric A and symmetric positive definite B, eig(A,B,'chol') computes the generalized eigenvalues of A and B using the Cholesky factorization of B . 'chol' is the default.eig(A,B,'qz') ignores the symmetry, if any, and uses the QZ algorithm. |
|
Now provides an interface to a subset of the ARPACK capabilities. See the eigs reference page for information about the expanded syntax, and the sigma and options arguments. The MATLAB 5 arbitrary ordering of the inputs B , k , sigma, and options is no longer allowed. |
|
|
|
A new Display options parameter value, 'notify' , displays output only if the function does not converge. For these functions, 'notify' is the default. |
|
MATLAB Version 5 changed the calling sequence for fzero . See the instructions for converting your code in "Function Functions" in the MATLAB documentation. |
|
Two new options produce these test matrices: 'randcolu' - Random matrix with normalized columns and specified singular values'randcorr' - Random correlation matrix with specified eigenvalues |
|
interp1(x,y,xi,method,'extrap') uses the specified method to extrapolate any element of xi that is outside the interval spanned by x .interp1(x,y,xi,method,extrapval) returns the scalar extrapval for out of range values. |
lu |
|
|
The ODE solvers can now solve problems without the use of an ODE file. Problem components are passed to the solvers directly as arguments, or provided using parameters in an options structure. See the ODE solvers and odeset reference pages for details.MATLAB 6.0 supports use of an ODE file for backwards compatibility, but new functionality is available only in the new syntax. |
|
An optional output argument for polyfit and an optional input argument to polyval provide for centering and scaling, that is, subtracting the mean and normalizing the standard deviation of the independent variable. |
quad |
quad(fun,a,b) uses a new default tolerance, 10-6.Because of the use of new quadrature algorithms, your results ( q ) and the number of function evaluations (trace(1) = fcnt ) may differ from MATLAB 5. The new algorithm provides more accurate results and generally result in improved performance. |
|
For real A and B , [AA,BB,Q,Z,V] = qz(A,B,'real') produces a real decomposition with a quasitriangular AA .[AA,BB,Q,Z,V] = qz(A,B,'complex') produces a possibly complex decomposition with a triangular AA . |
|
For real X , schur(X,'real') has the real eigenvalues on the diagonal and the complex eigenvalues in 2-by-2 blocks on the diagonal. schur(X,'complex') is triangular and is complex if X has complex eigenvalues. |
|
sort(S) now works on other data types, for example int32 , and has been rewritten to be faster on doubles. sort(S,dim) can now sort the elements of both full and sparse matrices along the dimension specified by dim . |
|
|
|
std([]) no longer returns empty. It now returns NaN , and a message, Warning: Divide by zero . |
Development Environment Features | Programming and Data Types Features |