summaryrefslogtreecommitdiff
path: root/3411/CH2/EX2.6/Ex2_6.sce
blob: 6efa919fdf99b0a7dbc27b0bce5c845d01ddcc0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//Example 2_6
clc();
clear;
//To Calculate the dispersive power of the grating
n=4000
e=1/n          //units in cm
k=3
lamda=5000      //units in armstrongs
lamda=lamda*10^-8         //units in cm
theta=asin((k*lamda)/e)*(180/%pi)        //units in degrees
costheta=cos(theta*%pi/180)
disppower=(k*n)/costheta
printf("The dispersive power of the grating is %.f",disppower)