Sparse Grids Matlab Kit

The Sparse Grids Matlab Kit is a collection of Matlab functions for high-dimensional quadrature and interpolation, based on the combination technique version of sparse grids.

It is lightweight, high-level and (hopefully) easy to use, good for quick prototyping and teaching. It comes with a very extensive documentation and examples (7000 lines of code, 3600 lines of comments).

It is somehow geared towards Uncertainty Quantification (UQ), but it is flexible enough for other purposes.



The Sparse Grids Matlab Kit is distributed with a BSD2 License



  • Sparse-grid-based quadrature and interpolation (Gauss-Legendre, Leja, Clenshaw-Curtis, Gauss-Hermite, Kronrod-Patterson-normal, Gaussian-Leja points supported)

  • Dimension-adaptive sparse grid algorithm

  • Conversion of a sparse-grid interpolant to a Polynomial Chaos Representation (Legendre, Chebyshev, Hermite polynomials supported)

  • Sparse-grid-based global and local sensitivity analysis (by computation of Sobol Indices and gradients of a sparse grid interpolant)

  • Export of sparse grid collocation points and weights to ASCII file

  • Visualization functions (plot of sparse grid points and sparse grid interpolant)


  • Chiara Piazzola, Lorenzo Tamellini, Raúl Tempone. A note on tools for prediction under uncertainty and identifiability of SIR-like dynamical systems for epidemiology, arXiv:2008.01400. Matlab code available here

  • Jesús Martínez-Frutos, Francisco Periago Esparza. Optimal Control of PDEs under Uncertainty - An Introduction with Application to Optimal Shape Design of Structures. Springer International Publishing, 2018. Book available here. Matlab code available here

Cite us

Please cite our toolbox by mentioning the webpage containing the package and adding the following reference to your work:

J. Bäck, F. Nobile, L. Tamellini, and R. Tempone. Stochastic spectral Galerkin and collocation methods for PDEs with random coefficients: a numerical comparison. In J.S. Hesthaven and E.M. Ronquist, editors, Spectral and High Order Methods for Partial Differential Equations, volume 76 of Lecture Notes in Computational Science and Engineering, pages 43–62. Springer, 2011.


author = {B\"ack, J. and Nobile, F. and Tamellini, L. and Tempone, R.},

title = {Stochastic spectral {G}alerkin and collocation methods for {PDE}s with random coefficients: a numerical comparison},

booktitle = {Spectral and High Order Methods for Partial Differential Equations},

pages = {43--62},

publisher = {Springer},

year = 2011,

volume = 76,

series = {Lecture Notes in Computational Science and Engineering},

editor = {Hesthaven, J.S. and Ronquist, E.M.},

note = {Selected papers from the ICOSAHOM '09 conference, June 22-26, Trondheim, Norway}


Get in touch

For any questions or to report a bug, send an email to tamellini AT imati DOT cnr DOT it .

Send us your email if you want to be notified when a new version is released online