OPoly

版本 1.0.1 (1.0 MB) 作者: Enrico Bertolazzi
Orthogonal polynomial class
27.0 次下载
更新时间 2022/5/12

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

引用格式

Enrico Bertolazzi (2024). OPoly (https://github.com/ebertolazzi/opoly/releases/tag/1.0.1), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2021b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.1

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

1.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库