Diffraction and beam-diameter measurement of Gaussian beams at optical and microwave frequencies.