With the rapid development of high-speed and urban rail transit, ballastless slab tracks have been widely used in many areas. The work on construction, design, and mechanics of ballastless slab tracks is abundant and achievements have been made. However, a platform for numerical simulation and dynamic analysis of slab track systems subjected to a moving train still needs to be probed into. In the MATLAB®, effective and easily programable methods are presented to guide the construction of the vehicle-slab track interaction system and the realization of long length computation in this present study. Based on previous studies, the formulation of slab track dynamics in the framework of finite element theory is founded with simplicities, and then the wheel-rail coupling matrices totally derived from the nonlinear wheel-rail normal contact/tangential creep forces using the energy variation method are presented. Following the dynamics modeling construction, an improved method for long or infinite length computation is proposed. With an implementation of this method, the effect of the spatial variability of track properties on vehicle-track system dynamic performance can be evaluated conveniently. Using this numerical simulation platform, extensive studies have been conducted to model and analyze the influence of spatial variability of filling layer support stiffness, the track slab finite element type and support type of steel spring for floating-slab tracks, etc.