mxdrfile is a set of wrapper functions that enables reading and writing Gromacs .xtc and .trr trajectory files in Matlab. The wrapper functions make direct use of the xdrfile library from Gromacs through the intrinsic loadlibrary function in Matlab.