  We present a MATLAB code that implements the Smoothed Particle Hydrodynamics
(SPH) method. The paper reviews the continuous Navier-Stokes equations as well
as their SPH approximation, adopting a coherent notation that allows to make
easy reference to the code. The MATLAB implementation was heavily inspired by
the earlier FORTRAN code of G. R. Liu and M. B. Liu, 2003. The code can be used
for simple computational fluid dynamics simulations. Two classical benchmark
problems are used to validate the algorithm: a one-dimensional shock tube and a
two-dimensional shear cavity problem.
