Spin-echo experiments with neutrons and with atomic beams