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:
> CompileOPolyLib
Usage
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 sequence
Its 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 sequence
Its possible to compute the zeros:
% epsi = tolerance in the zeros computation
x = p.zeros( n, epsi );
% x = vector with the coordinates of the zeros
Finally, 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 quadrature
Author
Reference
Walter Gautschi, Orthogonal Polynomials Computation and Approximation Oxford University Press, 2004
Zitieren als
Enrico Bertolazzi (2025). OPoly (https://github.com/ebertolazzi/opoly/releases/tag/1.0.1), GitHub. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
bin
lib
tests
doc
tests
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.1 | See release notes for this release on GitHub: https://github.com/ebertolazzi/opoly/releases/tag/1.0.1 |
|
|
1.0 |
|