A simple MATLAB program to compute differentiation matrices for arbitrary meshes via Lagrangian interpolation
Abstract: A MATLAB program for computing differentiation matrices for arbitrary one-dimensional meshes is presented in this manuscript. The differentiation matrices for a mesh of N arbitrarily spaced points are formed from those obtained using Lagrangian interpolation on stencils of a fixed but arbitrary number M<=N of contiguous mesh points. For the particular case M=N and meshes with Chebyshev or Legendre distributions of points, the program yields the well known spectral differentiation matrices. For M<N and M odd, the differentiation matrices coincide, for the special case of an evenly spaced mesh, with those obtained by central finite differences.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.