SHtools - Spherical Harmonics Toolbox
This small and basic set of routines has resulted from my need to create and manipulate real spherical harmonic coefficients in the context of geomagnetic applications. These coefficients are saved as vectors, since vector manipulation in Matlab is well-developed. The toolbox supports accessing a coefficient that corresponds to specific degree l and order m (where negative m corresponds to sin(m*phi) and positive m corresponds to cos(m*phi) terms); mapping the vector to a matrix and back; mapping to a grid using Schmidt semi-normalized spherical harmonics, and basic plotting.
Vectors consisting of several 'sections' of independent sets of coefficients are also to some degree supported (in my case they correspond to parametrization of different layers of the Earth).
Also contains a set of functions to integrate it with the publicly available DOTM library by F. J. Simons. In order to use SHRotateVec (rotation of spherical harmonic coefficients) please also install his library
http://geoweb.princeton.edu/people/simons/software.html
Name inspired by Fortran SHTOOLS software http://www.ipgp.jussieu.fr/~wieczor/SHTOOLS/SHTOOLS.html
Cite As
Anna Kelbert (2025). SHtools - Spherical Harmonics Toolbox (/matlabcentral/fileexchange/15279-shtools-spherical-harmonics-toolbox), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Mathematics and Optimization > Mapping Toolbox > Geometric Geodesy >
- Radar > Mapping Toolbox > Geometric Geodesy >
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.
SHtools/
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |