The dephasing times of CO and DCl isolated in van der Waals solids have been obtained by means of infrared picosecond photon echo experiments using the Orsay Free Electron Laser (CLIO). For CO in argon matrices, even at low temperature, an homogeneous behaviour has been observed. When trapping DCl in nitrogen matrices, isolated molecules as well as dimers are studied, allowing to probe different interaction strengths (van der Waals for the monomer and weak hydrogen bond for the dimer). We observed three different time-resolved structures corresponding to the excitation of the monomer and of the two stretching modes of the dimer.