Spherical Harmonics
This function generates the Spherical Harmonics basis functions of degree L and order M.
Author: Daniel Ennis
Nice work .
One minor comment: the output argument Ymn has the elevation and azimuth dimensions flipped with respect to the input RES argument, due to the nature of meshgrid. Thus, the rows of the output Ymn refer to elevation, while the columns of the output Ymn refer to azimuth.