The rotation and inversion of normal and deuterated ammonia in inert matrices