image thumbnail

First derivative of (normal) associated Legendre polynomials

version 2.0.0.0 (5.93 KB) by Rody Oldenhuis
First derivative of (normalized) associated Legendre polynomials

1K Downloads

Updated 25 Sep 2019

From GitHub

View license on GitHub

Computing accurate derivatives of the associated Legendre polynomials can be tricky. Even in advanced texts, they are usually written as recurrence relations and/or with (normalization) factors involving factorials.
A naive software implementation will therefore quickly run into the limits of IEEE754 double-precision, resulting in NaN/inf or significant loss of precision, already at very low degree N.
LEGENDRE_DERIVATIVE is a fully vectorized, numerically stable and robustly validated implementation of the derivative computation. It allows fast and accurate computations of the derivatives for any degree N.

It works the same as MATLAB's own LEGENDRE, except it does not compute the polynomial values, but the values of the derivatives.

Cite As

Rody Oldenhuis (2021). First derivative of (normal) associated Legendre polynomials (https://github.com/rodyo/FEX-legendre_derivative), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with R2008a and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.