From f35ea80659b6a49d1bb2ce1d7d002583f3f40947 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:38:01 +0530 Subject: updated the code --- 1026/CH8/EX8.17/Example8_17.sce | 43 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to '1026/CH8/EX8.17') diff --git a/1026/CH8/EX8.17/Example8_17.sce b/1026/CH8/EX8.17/Example8_17.sce index 99b6e0535..31025b009 100755 --- a/1026/CH8/EX8.17/Example8_17.sce +++ b/1026/CH8/EX8.17/Example8_17.sce @@ -1,23 +1,22 @@ -//chapter8,Example8_17,pg 210 - -grat=1/6000 - -f=30 - -n=2 - -lam1=5770*10^-8 - -lam2=5460*10^-8 - -dlam=lam1-lam2 - -lam=lam2 - -cos(theta)=sqrt(1-(((n*lam)/grat)^2)) - -dl=((n*f)/(grat*cos(theta)))*dlam - -printf("linear separation of two spectral lines\n") - +//chapter8,Example8_17,pg 210 + +grat=1/6000 + +f=30 + +n=2 + +lam1=5770*10^-8 + +lam2=5460*10^-8 + +dlam=lam1-lam2 + +lam=lam2 + +theta=acos(sqrt(1-(((n*lam)/grat)^2))) +dl=((n*f)/(grat*cos(theta)))*dlam + +printf("linear separation of two spectral lines\n") + printf("dl=%.4f cm",dl) \ No newline at end of file -- cgit