sphPlm_deriv(lmax, x)
[y, d] = sphPlm_deriv(lmax, x)
Computes the normalized associated Legendre polynomial
\sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_l^m(x)
and its derivative, suitable for use in spherical harmonics, for l=0,...,lmax and m=0,...,l.
Vectorized in x, returns matrix with scaled P_l^m(x) at y(:, l+1,m+1) and scaled d/dx P_l^m(x) at d(:, l+1,m+1).
Based on recursion formulas found in:
W.H. Press, Numerical Recipes 3rd edition, p. 292
T. Limpanuparb, J. Milthorpe, arXiv:1410.1748v1 [physics.chem-ph]
using the implementation gsl_sf_legendre_sphPlm_deriv_array found in the Gnu Scientific Library as a template.
Cite As
Ludvig (2023). sphPlm_deriv(lmax, x) (https://www.mathworks.com/matlabcentral/fileexchange/48377-sphplm_deriv-lmax-x), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.