sphPlm_deriv(lmax, x)

Version 1.2.0.0 (1.55 KB) by Ludvig
Normalized associated Legendre function for spherical harmonics, with derivative.
219 Downloads
Updated 7 Nov 2014

View License

[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 (2024). sphPlm_deriv(lmax, x) (https://www.mathworks.com/matlabcentral/fileexchange/48377-sphplm_deriv-lmax-x), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Numerical Integration and Differential Equations in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.2.0.0

Removed confusion about l and n

1.1.0.0

Removed confusion about l and n.

1.0.0.0