The Sun  model calculates analytical solution for surface deformation due to hydrostatic pressure inside a horizontal circular fracture (“penny-shaped”) in an elastic, homogeneous half-space. This can be used typically to simulate magma overpressure in a sill below a volcano.
The proposed Matlab script is a literal transcription of the Sun's paper equations. The equations are also vectorized for all input parameters.
See help for syntax, example, and script comments for details.