//Chapter-2,Example2_6_5,pg 2-34 wavelength=5890*10^-10 //wavelength of light d_wavelength=6*10^-10 m=2 //for second order N=wavelength/(d_wavelength*m) W=3 //width of grating width=W/N printf('\nNumber of lines is N = %.0f \n',N) printf('\n The grating element(width of line) is a+b =%.7f cm',width)