Ultra-high-resolution NMR. IV. A simple technique for measurements of sample temperature gradients