Laplacian in 1D, 2D, or 3D

Version 1.2 (5,27 KB) von Andrew Knyazev
Sparse (1-3)D Laplacian on a rectangular grid with exact eigenpairs.
Aktualisiert 15 Mai 2015

Lizenz anzeigen

The code computes the exact eigenpairs of (1-3)D negative Laplacian on a rectangular finite-difference grid for combinations of Dirichlet, Neumann, and Periodic boundary conditions using explicit formulas from
The code can also compute the sparse matrix itself, using Kronecker sums of 1D Laplacians. For more information on tensor sums, see

Example, compute everything for 3D negative Laplacian with mixed boundary conditions:
[lambda,V,A] = laplacian([100,45,55],{'DD' 'NN' 'P'}, 20);
Compute only the eigenvalues:
lambda = laplacian([100,45,55],{'DD' 'NN' 'P'}, 20);
Compute the matrix only:
[~,~,A] = laplacian([100,45,55],{'DD' 'NN' 'P'});

GNU OCTAVE compatible.

This code is a part of the BLOPEX eigensolver package, see
or go directly to

Copyright owners: Bryan C. Smith and Andrew V. Knyazev

Zitieren als

Andrew Knyazev (2024). Laplacian in 1D, 2D, or 3D (, MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2010b
Kompatibel mit allen Versionen
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise

Revision 1.1 changes: rearranged the output variables, always compute the eigenvalues, compute eigenvectors and/or the matrix on demand only.
added a conversion to a toolbox

updated description