blob: c30bc12b7db2293ff83cf5621f74a1e2949cf6af (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
clc
//given that
d = 2.5 // crystal spacing in angstrom
n = 1 // order for longest passing wavelength
theta = 20 // angle for longest passing wavelength
printf("Example 3.5")
lambda = 2*d*sin(theta*%pi/180)/n // Calculation of longest wavelength
printf("\nLongest wavelength is %f angstrom. \n\n\n",lambda)
|