FiniteDifferenceMatrix
Build a finite-difference differentiation matrix with boundary stencils.
Developer documentation: this item describes internal implementation details.
Declaration
D = FiniteDifferenceMatrix(numDerivs,x,leftBCDerivs,rightBCDerivs,orderOfAccuracy)
Parameters
numDerivsderivative order to approximatexgrid on which to build the stencil matrixleftBCDerivsderivative order enforced at the left boundaryrightBCDerivsderivative order enforced at the right boundaryorderOfAccuracyformal order of accuracy
Returns
Ddifferentiation matrix