Matlab Capabilities

Páginas: 6 (1257 palabras) Publicado: 24 de octubre de 2011
MATLAB Capabilities

GAUSS ELIMINATION

gauss (A,b)
backslash operator \
Usage: x = gauss (A,b)
Description: Solve linear algebraic system, Ax = b, using Gauss elimination.
Inputs: A = m by n coefficient matrix
b = m by 1 right-hand side vector
Outputs: x = n by 1 solution vector
Note: A must be of full rank. If m m > n,then the minimum least-squares solution of Ax(= b is computed: so that: x = A’A\A’b

LU FACTORIZATION
[L,U] = LU(X) stores a upper triangular matrix in U and a "psychologically lower triangular matrix" (i.e. a product of lower triangular and permutation matrices) in L, so that X = L*U. X must be square.

[L,U,P] = LU(X) returns lower triangular matrix L, upper triangular matrix U, andpermutation matrix P so that P*X = L*U. Uses LINPACK'S ZGEFA routine.

LU(X,THRESH) controls pivoting in sparse matrices, where THRESH is a pivot threshold in [0,1]. Pivoting occurs when the diagonal entry in a column has magnitude less than THRESH times the magnitude of any sub-diagonal entry in that column. THRESH = 0 forces diagonal pivoting. THRESH = 1 is the default.

INTERPOLATIONSPLINE Cubic spline (See also Spline Toolbox)

YI = SPLINE(X,Y,XI) uses cubic spline interpolation to find a vector YI corresponding to XI. X and Y are the given data vectors and XI is the new abscissa vector XI.

PP = SPLINE(X,Y) returns the pp-form of the cubic spline instead, for later use with ppval, etc. Here's an example that generates a coarse sine curve, theninterpolates over a finer abscissa:
x = 0:10; y = sin(x); xi = 0:.25:10; yi = spline(x,y,xi); plot(x,y,'o',xi,yi)

PPVAL Evaluate piecewise polynomial.
V = PPVAL(PP,XX) returns the value of the piecewise polynomial PP at the points XX. Piecewise polynomial form (pp-form) is returned by SPLINE.

INTERP1 1-D interpolation (table lookup)

YI= INTERP1(X,Y,XI) interpolates to find YI, the values of the underlying function Y at the points in the vector XI. The vector X specifies points at which the data Y is given.
YI = INTERP1(X,Y,XI,'method') specifies alternate methods. The default is linear interpolation. Available methods are: 'nearest' - nearest neighbor interpolation 'linear' - linear interpolation 'spline' - cubicspline interpolation 'cubic' - cubic interpolation

All the interpolation methods require that X be monotonic. X can be non-uniformly spaced. For faster interpolation when X is equally spaced and monotonic, use the methods '*linear', '*cubic', '*nearest', or '*spline'.

Least Squares POLYFIT Fit polynomial

POLYFIT(X,Y,N) finds polynomial coefficients P(X) of degree N thatfits data, P(X(I))~=Y(I), in least-squares sense.

[P,S] = POLYFIT(X,Y,N) returns polynomial coefficients P and a structure S for use with POLYVAL to obtain error estimates on predictions. If the errors in data, Y, are independent normal with constant variance, POLYVAL will produce error bounds which contain at least 50% of the predictions.

POLYVAL evaluates polynomial
Y =POLYVAL(P,X), when P is a vector of length N+1 whose elements are the coefficients of a polynomial, is the value of the polynomial evaluated at X. Y = P(1)*X^N + P(2)*X^(N-1) + ... + P(N)*X + P(N+1). If X is a matrix or vector, the polynomial is evaluated at all points in X.

NUMERICAL QUADRATURE

QUAD Numerically evaluate integral, low order
Q = QUAD('F',A,B,TOL) approximatesintegral of F(X) from A to B to within a relative error of 1e-3 using an adaptive recursive Simpson's rule. 'F' is a string containing the name of the function. Function F must return a vector of output values if given a vector of input values. Q = Inf is returned if an excessive recursion level is reached, indicating a possibly singular integral. Use a two element tolerance, TOL = [rel_tol...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Capabilities
  • matlab
  • matlab
  • Matlab
  • Matlab
  • matlab
  • MATLAB
  • MATLAB

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS