Fdmat.m

From Spinach Documentation Wiki
Revision as of 17:28, 2 November 2015 by Admin (talk | contribs) (Created page with "Returns arbitrary-order central finite-difference differentiation matrix (sparse) with unit spacing and sided finite-difference schemes of the same order at the edges. Syntax:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Returns arbitrary-order central finite-difference differentiation matrix (sparse) with unit spacing and sided finite-difference schemes of the same order at the edges. Syntax:

                  D=fdmat(dim,npoints,order,boundary)

Parameters:

    dim       - dimension of the column vector to be
                differentiated
    npoints   - number of points in the finite diffe-
                rence stencil
    order     - order of the derivative required
    boundary  - 'wall' fills the edges with sided
                finite difference schemes, 'pbc'
                assumes periodic boundaries. The
                default is 'wall'.