OPoly
Online doc at: http://ebertolazzi.github.io/opoly/
GITHUB homepage: https://github.com/ebertolazzi/opoly
MATLAB toolbox: https://github.com/ebertolazzi/opoly/releases
Introduction
A small header only library for the computation of orthogonal polynomial.
The supported polynomials are:
- Jacobi
- Legendre
- Chebyshev
- Laguerre
- Hermite
Moreover the class computes the zeros of the polynomilas and weight and nodes of gaussian quadrature.
Matlab Interface
Install the toolbox (download at the link). After the installation compile the Toolbox in the command windows of Matlab:
> CompileOPolyLibUsage
Instantiate a polynomial
% kind = 'jacobi', 'legendre', 'chebyshev', 'laguerre', 'hermite'
kind = 'chebyshev'
p = OPoly(kind);special case for Jacobi and Laguerre
p = OPoly('jacobi',alpha,beta);
p = OPoly('laguerre',alpha);After instantiation, the polynomial can be evaluated:
n = 10; % polynomial degree
x = 0:0.1:1;
y = p.eval( n, x );evaluate the polynomial with first derivative and sign variations
[y,yp,s] = p.eval2( n, x );
% y = p(x)
% yp = p'(x)
% s = sign variaton of the corresponding Sturm sequenceIts possible to get the complete Sturm sequence
[p,s] = p.sequence( n, x );
% p = p_0(x), p_2(x), ..., p_n(x)
% s = sign variaton of the corresponding Sturm sequenceIts possible to compute the zeros:
% epsi = tolerance in the zeros computation
x = p.zeros( n, epsi );
% x = vector with the coordinates of the zerosFinally, compute nodes and weigth of Gauss quadrature for the interval [-1,1]
% epsi = tolerance in the zeros computation
[x,w] = p.gauss( n, epsi );
% x = nodes of the quadrature
% w = weight of the quadratureAuthor
Reference
Walter Gautschi, Orthogonal Polynomials Computation and Approximation Oxford University Press, 2004
Citation pour cette source
Enrico Bertolazzi (2025). OPoly (https://github.com/ebertolazzi/opoly/releases/tag/1.0.1), GitHub. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
bin
lib
tests
doc
tests
| Version | Publié le | Notes de version | |
|---|---|---|---|
| 1.0.1 | See release notes for this release on GitHub: https://github.com/ebertolazzi/opoly/releases/tag/1.0.1 |
|
|
| 1.0 |
|
