//Example 28.5 u=0.825;//Speed at which the galaxy is moving away from the Earth (in terms of c) lambda_s=0.525;//Wavelength of radio waves (m) c=1;//Speed of light (in terms of c) lambda_obs=lambda_s*sqrt((1+u/c)/(1-u/c));//Wavelength detected on the Earth (m) printf('Wavelength of radio waves detected on the Earth = %0.2f m',lambda_obs) //Openstax - College Physics //Download for free at http://cnx.org/content/col11406/latest