NAG Logo
Numerical Algorithms Group

NAG Foundation Toolbox - M-file On-line Help

Note: NAG is replacing its popular NAG Foundation Toolbox for MATLAB® with the NAG Toolbox for MATLAB®.

NAG is no longer taking new orders for the NAG Foundation Toolbox for MATLAB®. Existing supported customers of the NAG Foundation Toolbox for MATLAB® will be offered an upgrade to the NAG Toolbox for MATLAB®.

However, NAG will continue to provide the documentation below in support of those currently using the discontinued NAG Foundation Toolbox for MATLAB®.

The next generation of this product, the NAG Toolbox for MATLAB®, is now available in Beta2 form. Please visit the NAG Toolbox for MATLAB® overview page for more details. If you would like specific information about how to switch your existing license to the NAG Toolbox for MATLAB® please contact us.


C02 -- Zeros of Polynomials

c02aff All zeros of complex polynomial, modified Laguerre method
c02agf All zeros of real polynomial, modified Laguerre method

C05 -- Roots of One or More Transcendental Equations

c05adf Zero of continuous function in given interval, Bus and Dekker algorithm
c05nbf Solution of system of nonlinear equations using function values only (easy-to-use)
c05pbf Solution of system of nonlinear equations using 1st derivatives (easy-to-use)
c05zaf Check user's routine for calculating 1st derivatives

C06 -- Summation of Series

c06eaf Single 1-D real discrete Fourier transform, no extra workspace
c06ebf Single 1-D Hermitian discrete Fourier transform, no extra workspace
c06ecf Single 1-D complex discrete Fourier transform, no extra workspace
c06ekf Circular convolution or correlation of two real vectors, no extra workspace
c06fpf Multiple 1-D real discrete Fourier transforms
c06fqf Multiple 1-D Hermitian discrete Fourier transforms
c06frf Multiple 1-D complex discrete Fourier transforms
c06fuf 2-D complex discrete Fourier transform
c06gbf Complex conjugate of Hermitian sequence
c06gqf Complex conjugate of multiple Hermitian sequences
c06gsf Convert Hermitian sequences to general complex sequences

D01 -- Quadrature

d01ajf 1-D quadrature, adaptive, finite interval, strategy due to Piessens and de Doncker,allowing for badly-behaved integrands
d01akf 1-D quadrature, adaptive, finite interval, method suitable for oscillating functions
d01alf 1-D quadrature, adaptive, finite interval, allowing for singularities at user-specifiedbreak-points
d01amf 1-D quadrature, adaptive, infinite or semi-infinite interval
d01anf 1-D quadrature, adaptive, finite interval, weight function cos ( omega x) or sin ( omega x)
d01apf 1-D quadrature, adaptive, finite interval, weight function with end-point singularities ofalgebraico-logarithmic type
d01aqf 1-D quadrature, adaptive, finite interval, weight function 1/(x - c), Cauchy principal value(Hilbert transform)
d01asf 1-D quadrature, adaptive, semi-infinite interval, weight function cos ( omega x) or sin ( omega x)
d01bbf Pre-computed weights and abscissae for Gaussian quadrature rules, restricted choice of rule
d01fcf Multi-dimensional adaptive quadrature over hyper-rectangle
d01gaf 1-D quadrature, integration of function defined by data values, Gill-Miller method
d01gbf Multi-dimensional quadrature over hyper-rectangle, Monte Carlo method

D02 -- Ordinary Differential Equations

d02bbf ODEs, IVP, Runge-Kutta-Merson method, over a range, intermediate output (simple driver)
d02bhf ODEs, IVP, Runge-Kutta-Merson method, until function of solution is zero (simple driver)
d02cjf ODEs, IVP, Adams method, until function of solution is zero, intermediate output (simple driver)
d02ejf ODEs, stiff IVP, BDF method, until function of solution is zero, intermediate output (simple driver)
d02gaf ODEs, boundary value problem, finite difference technique with deferred correction, simple nonlinear problem
d02gbf ODEs, boundary value problem, finite difference technique with deferred correction, general linear problem
d02kef 2nd order Sturm-Liouville problem, regular/singular system, finite/infinite range, eigenvalue and eigenfunction,user-specified break-points
d02raf ODEs, general nonlinear boundary value problem, finite difference technique with deferred correction,continuation facility

D03 -- Partial Differential Equations

d03edf Elliptic PDE, solution of finite difference equations by a multigrid technique
d03eefDiscretize a 2nd order elliptic PDE on a rectangle

E01 -- Interpolation

e01baf Interpolating functions, cubic spline interpolant, one variable
e01bef Interpolating functions, monotonicity-preserving, piecewise cubic Hermite, one variable
e01bff Interpolated values, interpolant computed by e01bef -, function only, one variable
e01bgfInterpolated values, interpolant computed by e01bef -, function and 1st derivative, one variable
e01bhfInterpolated values, interpolant computed by e01bef -, definite integral, one variable
e01daf Interpolating functions, fitting bicubic spline, data on rectangular grid
e01saf Interpolating functions, method of Renka and Cline, two variables
e01sbfInterpolated values, evaluate interpolant computed by e01saf -, two variables
e01sefInterpolating functions, modified Shepard's method, two variables
e01sffInterpolated values, evaluate interpolant computed by e01sef -, two variables

E02 -- Curve and Surface Fitting

e02adfLeast-squares curve fit, by polynomials, arbitrary data points
e02aefEvaluation of fitted polynomial in one variable from Chebyshev series form (simplified parameter list)
e02agfLeast-squares polynomial fit, values and derivatives may be constrained, arbitrary data points,
e02ahfDerivative of fitted polynomial in Chebyshev series form
e02ajfIntegral of fitted polynomial in Chebyshev series form
e02akfEvaluation of fitted polynomial in one variable, from Chebyshev series form
e02bafLeast-squares curve cubic spline fit (including interpolation)
e02bbfEvaluation of fitted cubic spline, function only
e02bcfEvaluation of fitted cubic spline, function and derivatives
e02bdfEvaluation of fitted cubic spline, definite integral
e02befLeast-squares cubic spline curve fit, automatic knot placement
e02dafLeast-squares surface fit, bicubic splines
e02dcfLeast-squares surface fit by bicubic splines with automatic knot placement, data on rectangular grid
e02ddfLeast-squares surface fit by bicubic splines with automatic knot placement, scattered data
e02defEvaluation of a fitted bicubic spline at a vector of points
e02dffEvaluation of a fitted bicubic spline at a mesh of points
e02gaf 1L -approximation by general linear function
e02zafSort 2-D data into panels for fitting bicubic splines

E04 -- Minimizing or Maximizing a Function

e04dgfUnconstrained minimum, pre-conditioned conjugate gradient algorithm, function of several variables using 1stderivatives (comprehensive)
e04dkfSupply optional parameter values to e04dgf -
e04fdfUnconstrained minimum of a sum of squares, combined Gauss-Newton and modified Newton algorithm usingfunction values only (easy-to-use)
e04gcfUnconstrained minimum of a sum of squares, combined Gauss-Newton and quasi-Newton algorithm, using 1stderivatives (easy-to-use)
e04jafMinimum, function of several variables, quasi-Newton algorithm, simple bounds,using function values only(easy-to-use)
e04mbfLinear programming problem (easy-to-use)
e04nafQuadratic programming problem (comprehensive)
e04ucfMinimum, function of several variables, sequential QP method, nonlinear constraints, using function values andoptionally 1st derivatives (comprehensive)
e04uefSupply optional parameter values to e04ucf -
e04ycfCovariance matrix for nonlinear least-squares problem

F01 -- Matrix Factorizations

f01brfLU factorization of real sparse matrix
f01bsfLU factorization of real sparse matrix with known sparsity pattern
f01mafIncomplete Cholesky factorization of real sparse symmetric positive-definite matrix
f01mcf TLDL factorization of real symmetric positive-definite variable-bandwidth matrix
f01qcfQR factorization of real m by n matrix (m >= n)
f01qdf TOperations with orthogonal matrices, compute QB or Q B after factorization by f01qcf - or f01qff -
f01qefOperations with orthogonal matrices, form colspanumns of Q after factorization by f01qcf - or f01qff -
f01rcfQR factorization of complex m by n matrix (m >= n)
f01rdf HOperations with unitary matrices, compute QB or Q B after factorization by f01rcf -
f01refOperations with unitary matrices, form colspanumns of Q after factorization by f01rcf -

F02 -- Eigenvalue and Eigenvectors

f02aafAll eigenvalues of real symmetric matrix (Black Box)
f02abfAll eigenvalues and eigenvectors of real symmetric matrix (Black Box)
f02adfAll eigenvalues of generalized real symmetric-definite eigenproblem (Black Box)
f02aefAll eigenvalues and eigenvectors of generalized real symmetric-definite eigenproblem (Black Box)
f02affAll eigenvalues of real matrix (Black Box)
f02agfAll eigenvalues and eigenvectors of real matrix (Black Box)
f02ajfAll eigenvalues of complex matrix (Black Box)
f02akfAll eigenvalues and eigenvectors of complex matrix (Black Box)
f02awfAll eigenvalues of complex Hermitian matrix (Black Box)
f02axfAll eigenvalues and eigenvectors of complex Hermitian matrix (Black Box)
f02bbfSelected eigenvalues and eigenvectors of real symmetric matrix (Black Box)
f02bjfAll eigenvalues and optionally eigenvectors of generalized eigenproblem by QZ algorithm, real matrices (Black Box)
f02fjfSelected eigenvalues and eigenvectors of sparse symmetric eigenproblem (Black Box)
f02wefSVD of real matrix
f02xefSVD of complex matrix

F04 -- Simultaneous Linear Equations

f04adfApproximate solution of complex simultaneous linear equations with multiple right-hand sides (Black Box)
f04arfApproximate solution of real simultaneous linear equations, one right-hand side (Black Box)
f04asfAccurate solution of real symmetric positive-definite simultaneous linear equations, one right-hand side(Black Box)
f04atfAccurate solution of real simultaneous linear equations, one right-hand side (Black Box)
f04axfApproximate solution of real sparse simultaneous linear equations (coefficient matrix already factorized)
f04fafApproximate solution of real symmetric positive-definite tridiagonal simultaneous linear equations, oneright-handside (Black Box)
f04jgfLeast-squares (if rank = n) or minimal least-squares (if rank < n) solution of m real equations in n unknowns,rank <= n, m >= n
f04mafReal sparse symmetric positive-definite simultaneous linear equations(coefficient matrix already factorized)
f04mbfReal sparse symmetric simultaneous linear equations
f04mcfApproximate solution of real symmetric positive-definite variable-bandwidth simultaneous linear equations(coefficient matrix already factorized)
f04qafSparse linear least-squares problem, m real equations in n unknowns

F07 -- Linear Equations (LAPACK)

f07adfLU factorization of real m by n matrix (SGETRF/DGETRF)
f07aefSolution of real system of linear equations, multiple right-hand sides,matrix already factorized by f07adf -(SGETRS/DGETRS)
f07fdfCholesky factorization of real symmetric positive-definite matrix (SPOTRF/DPOTRF)
f07fefSolution of real symmetric positive-definite system of linear equations, multiple right-hand sides, matrixalready factorized by
f07fdf - (SPOTRS/DPOTRS)

G01 -- Simple Calculations and Statistical Data

g01aafMean, variance, skewness, kurtosis etc, one variable, from raw data
g01adfMean, variance, skewness, kurtosis etc, one variable, from frequency table
g01aefFrequency table from raw data
g01aff 2Two-way contingency table analysis, with chi /Fisher's exact test
g01alfComputes a five-point summary (median, hinges and extremes)
g01arfConstructs a stem and leaf plot
g01eafComputes probabilities for the standard Normal distribution
g01ebfComputes probabilities for Student's t-distribution
g01ecf 2Computes probabilities for chi distribution
g01edfComputes probabilities for F-distribution
g01eefComputes upper and lower tail probabilities and probability density function for the beta distribution
g01effComputes probabilities for the gamma distribution
g01fafComputes deviates for the standard Normal distribution
g01fbfComputes deviates for Student's t-distribution
g01fcf 2Computes deviates for the chi distribution
g01fdfComputes deviates for the F-distribution
g01fefComputes deviates for the beta distribution
g01fffComputes deviates for the gamma distribution
g01hafComputes probabilities for the bivariate Normal distribution

G02 -- Correlation and Regression Analysis

g02bqfKendall/Spearman non-parametric rank correlation coefficients, no missing values, preserving input data
g02bxfComputes (optionally weighted) correlation and covariance matrices
g02cafSimple linear regression with constant term, no missing values
g02dafFits a general (multiple) linear regression model
g02dgfFits a general linear regression model for new dependent variable
g02dnfComputes estimable function of a general linear regression model and its standard error
g02fafCalculates standardized residuals and influence statistics
g02gbfFits a generalized linear model with binomial errors
g02gcfFits a generalized linear model with Poisson errors

G03 -- Multivariate Methods

g03aafPerforms principal component analysis
g03adfPerforms canonical correlation analysis
g03bafComputes orthogonal rotations for loading matrix, generalized orthomax criterion

G05 -- Random Number Generators

g05cafPseudo-random real numbers, uniform distribution over (0,1)
g05cbfInitialise random number generating routines to give repeatable sequence
g05ccfInitialise random number generating routines to give non-repeatable sequence
g05cffSave state of random number generating routines
g05cgfRestore state of random number generating routines
g05ddfPseudo-random real numbers, Normal distribution
g05dffPseudo-random real numbers, Cauchy distribution
g05dpfPseudo-random real numbers, Weibull distribution
g05dyfPseudo-random integer from uniform distribution
g05dzfPseudo-random logical (boolean) value
g05eafSet up reference vector for multivariate Normal distribution
g05ecfSet up reference vector for generating pseudo-random integers, Poisson distribution
g05edfSet up reference vector for generating pseudo-random integers, binomial distribution
g05ehfPseudo-random permutation of an integer vector
g05ejfPseudo-random sample from an integer vector
g05exfSet up reference vector from supplied cumulative distribution function or probability distribution function
g05eyfPseudo-random integer from reference vector
g05ezfPseudo-random multivariate Normal vector from reference vector
g05fafGenerates a vector of pseudo-random numbers from a uniform distribution
g05fbfGenerates a vector of pseudo-random numbers from a (negative) exponential distribution
g05fdfGenerates a vector of pseudo-random numbers from a Normal distribution
g05fefGenerates a vector of pseudo-random numbers from a beta distribution
g05fffGenerates a vector of pseudo-random numbers from a gamma distribution
g05hdfGenerates a realisation of a multivariate time series from a VARMA model

G08 -- Nonparametric Statistics

g08aafSign test on two paired samples
g08acfMedian test on two samples of unequal size
g08aefFriedman two-way analysis of variance on k matched samples
g08affKruskal-Wallis one-way analysis of variance on k samples of unequal size
g08agfPerforms the Wilcoxon one sample (matched pairs) signed rank test
g08ahfPerforms the Mann-Whitney U test on two independent samples
g08ajfComputes the exact probabilities for the Mann-Whitney U statistic, no ties in pooled sample
g08akfComputes the exact probabilities for the Mann-Whitney U statistic, ties in pooled sample
g08cgf 2Performs the chi goodness of fit test, for standard continuous distributions

G13 -- Time Series Analysis

g13aafUnivariate time series, seasonal and non-seasonal differencing
g13abfUnivariate time series, sample autocorrelation function
g13acfUnivariate time series, partial autocorrelations from autocorrelations
g13adfUnivariate time series, preliminary estimation, seasonal ARIMA model
g13affUnivariate time series, estimation, seasonal ARIMA model (easy-to-use)
g13agfUnivariate time series, update state set for forecasting
g13ahfUnivariate time series, forecasting from state set
g13ajfUnivariate time series, state set and forecasts, from fully specified seasonal ARIMA model
g13asfUnivariate time series, diagnostic checking of residuals, following g13aef - or g13aff -
g13bafMultivariate time series, filtering (pre-whitening) by an ARIMA model
g13bcfMultivariate time series, cross correlations
g13bdfMultivariate time series, preliminary estimation of transfer function model
g13befMultivariate time series, estimation of multi-input model
g13bjfMultivariate time series, state set and forecasts from fully specified multi-input model
g13cbfUnivariate time series, smoothed sample spectrum using spectral smoothing by the trapezium frequency(Daniell) window
g13cdfMultivariate time series, smoothed sample cross spectrum using spectral smoothing by the trapezium frequency(Daniell) window

M01 -- Sorting

m01cafSort a vector, real numbers
m01dafRank a vector, real numbers
m01defRank rows of a matrix, real numbers
m01djfRank colspanumns of a matrix, real numbers
m01eafRearrange a vector according to given ranks, real numbers
m01zafInvert a permutation

S -- Approximations of Special Functions

s01eaf zComplex exponential, e
s13aafExponential integral E (x) 1
s13acfCosine integral Ci(x)
s13adfSine integral Si(x)
s14aafGamma function
s14abfLog Gamma function
s14bafIncomplete gamma functions P(a,x) and Q(a,x)
s15adfComplement of error function erfc x
s15aefError function erf x
s17acfBessel function Y (x) 0
s17adfBessel function Y (x) 1
s17aefBessel function J (x) 0
s17affBessel function J (x) 1
s17agfAiry function Ai(x)
s17ahfAiry function Bi(x)
s17ajfAiry function Ai' (x)
s17akfAiry function Bi' (x)
s17dcfBessel functions Y (z), real a >= 0, complex z, nu + anu = 0,1,2,...
s17defBessel functions J (z), real a >= 0, complex z, nu +anu = 0,1,2,...
s17dgfAiry functions Ai(z) and Ai' (z), complex z
s17dhfAiry functions Bi(z) and Bi' (z), complex z
s17dlf jHankel functions H (z), j = 1,2, real nu + aa >= 0, complex z, nu = 0,1,2,...
s18acfModified Bessel function K (x) 0
s18adfModified Bessel function K (x) 1
s18aefModified Bessel function I (x) 0
s18affModified Bessel function I (x) 1
s18dcfModified Bessel functions K (z), real a >= 0, nu + acomplex z, nu = 0,1,2,...
s18defModified Bessel functions I (z), real a >= 0, nu + acomplex z, nu = 0,1,2,...
s19aafKelvin function ber x
s19abfKelvin function bei x
s19acfKelvin function ker x
s19adfKelvin function kei x
s20acfFresnel integral S(x)
s20adfFresnel integral C(x)
s21bafDegenerate symmetrised elliptic integral of 1st kind R (x,y) C
s21bbfSymmetrised elliptic integral of 1st kind R (x,y,z) F
s21bcfSymmetrised elliptic integral of 2nd kind R (x,y,z) D
s21bdfSymmetrised elliptic integral of 3rd kind R (x,y,z,r) J
© The Numerical Algorithms Group 2008
Privacy Policy | Trademarks

© Numerical Algorithms Group

Visit NAG on the web at:

www.nag.co.uk (Europe and ROW)
www.nag.com (North America)
www.nag-j.co.jp (Japan)

http://www.nag.co.uk/nagware/mt/doc/Contents.asp