1 2 3 4 5 6 7 8 9 10 11 12 13 14
clc //Variable declaration d=1.18 theta=90*%pi/180 lamda=1.540 //Calculations n=(2*d*sin(theta))/lamda //Result printf('n =%0.3f \n',(n))