The Mogi  model allows to calculate analytic solution for surface deformation due to a point source in an elastic half-space. This model is widely used to simulate ground deformation produced by local perturbation like volcanic magma chamber. It computes displacements, tilt and strain in a polar space, due to a volume variation at depth [Anderson, 1936] or an isotropic pressure variation in a spherical source [Mogi, 1958].
The proposed Matlab script is a literal transcription of Mogi's simple equations, extended to non-isotropic medium (Poisson's ratio different from 0.25). All parameters can be vectorized. See help for syntax, and script comments for details.
Bug correction: radial strain value (optional er output argument) was wrong... Now corrected.
IMPORTANT: corrects an error when specifying elastic parameters E and nu.
Possibility to specify a Poisson's ratio different from 0.25 for non-isotropic medium. Previous input parameters are still allowed.