File Exchange

image thumbnail


version (19 KB) by J.A.C Weideman
MATLAB Differentiation Matrix Suite


Updated 27 Jun 2003

No License

This is a software package consisting of seventeen MATLAB functions for solving differential equations on bounded, periodic, and infinite intervals by the spectral collocation (pseudospectral) method. Additional functions are included for incorporating boundary conditions, performing interpolation using barycentric formulas, and computing roots of orthogonal polynomials. Additional programs demonstrate how to use the package by solving eigenvalue, boundary value, and initial value problems arising in the fields of special functions, quantum mechanics, nonlinear waves, and hydrodynamic stability.

Details are in the accompanying paper, published in
JAC Weideman, SC Reddy, A MATLAB differentiation
matrix suite, ACM Transactions of Mathematical Software,
Vol 26, pp 465-519 (2000).

Web Site:

Tested under MATLAB R13.

Cite As

J.A.C Weideman (2021). DMSUITE (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (30)

Mahdi S. Hosseini

A generalized framework called MaxPol has been recently published and made available here

MaxPol provides a framework to design variety of numerical differentiation kernels with properties like:
(1) Cutoff (lowpass) design with no side-lob artifacts (for noise-robust case)
(2) Arbitrary order of differentiation
(3) Arbitrary polynomial accuracy
(4) Derivative matrix design
(5) 2D Derivative Kernels with Steering moments
(6) Intuitive examples in Signal and Image processing

You JB


A useful pack, mainly when accomplished with the ODE solver for evolution in time.

lou jie


There algorith behind the function poldif.m is numerically unstable. Consider the following code

N = 30;
x0 = linspace( 0, 1, N)';
x1 = x0.^2;
x2 = x1.*x0;
D0 = poldif( x0, 1 );
D1 = poldif( x1, 1 );
D2 = poldif( x2, 1 );

These are simply three different distributions of nodes 0 <= x <= 1.
Given N points each of the differentiating matrices should be rank N - 1, a differentiating has the constant vector as its null space.

rD0 = rank( D0 )
rD1 = rank( D1 )
rD2 = rank( D2 )
reveals ranks of 29, 6, and 3 respectivly! Firstly this indicates tha the algorithm has failed, even for the modest number of 30 nodes. Now if we compute D times a constant vector it should yield the zero vector.
vnD0 = D0 * ones( N, 1);
vnD1 = D1 * ones( N, 1);
vnD2 = D2 * ones( N, 1);
It does not. This is a more serious error. Since the errors are concentrated at the ends of the support. Exactly where we need precision if initial and boundary value problems are to be solved accurately.

Despite this problem, the package as a whole is an important contribution.

David E. Horsley

Intuitive, well documented and extremely useful!

liu tao


Wondimu Tadiwos

I got your site helping me in my work On FORTRAN sice i am student

Richard Collins

Nicely put together package cheers!

shufen wang

Thank you very much!!

liam liao

good job;
thank you very much.

Blair Blakie

A great well-thought out library

Adrian Alexandrescu

Very good package! However, the function poldif.m fails when the number of nodes (roots) increases (e.g. 500 for Hermite polynomials, 130 for Laguerre polynomials). This is due to the calculation of the entries c(k)/c(j): first, takes the product and afterwards the division. The product produces overflow.

Sante Scuro

Samuel Oliveira

Simple and powerful.

Mary Manning

Very useful for performing input/output (transient amplification) analysis of dynamical systems. easy to use, well-documented

William Young

Juan Fernandez

Indispensable for my research!

Calin Gheorghiu

Excellent tools!

Javier Ochoa

I wish whether can help me solving non linear BVP in biotechnology

li qun

Peter Pan

Great tools

Fernando Vadillo

Great Toolbox !, I am using for nonlinear Schrödinge equations.

Mohammad Rahmani

Great Toolbox,
Very useful.

Ed K.

Great work!!!
very useful to understand simple concepts
behind the theory & visualize them.
Would recommend to any university student.

Jagjit Singh Thakur Ratan

Excellent !!!
Solved lot many problems about differentiation!!!

michael ross

This stuff is amazing!

Alfonso Bueno

Useful and beautiful codes for solving differential equations with spectral and pseudospectral methods.

omar chaab

i'm interesting by this method and thanks for
the help

MATLAB Release Compatibility
Created with R10
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!