OPoly

Orthogonal polynomial class
28 descargas
Actualizado 12 may 2022

OPoly

File Exchange

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

Enrico Bertolazzi
Dipartimento di Ingegneria Industriale
Università degli Studi di Trento

Reference

Walter Gautschi, Orthogonal Polynomials Computation and Approximation Oxford University Press, 2004

Citar como

Enrico Bertolazzi (2024). OPoly (https://github.com/ebertolazzi/opoly/releases/tag/1.0.1), GitHub. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2021b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.1

See release notes for this release on GitHub: https://github.com/ebertolazzi/opoly/releases/tag/1.0.1

1.0

Para consultar o notificar algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.
Para consultar o notificar algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.