Matlab code for modeling solar system dynamics and spacecraft trajectories