summaryrefslogtreecommitdiff
path: root/3537/CH5/EX5.33/Ex5_33.sce
blob: abea72a1b232ecf8596c75c85d99588a6f7ecb6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//Example 5_33
clc();
clear;
//To calculate the wavelength and maximum order of diffraction
d=0.282*10^-9                   //units in meters
theta=8.583                   //units in degrees
lamda=2*d*(sin(theta*%pi/180))
lamda1=lamda*10^10    //units in A
theta=90  //units in degrees
n=(2*(d)*sin(theta*%pi/180))/lamda
printf("wave length lamda=%.3fA",lamda1)
printf("\nMaximum order of diffraction n=%d",round(n))