diff options
Diffstat (limited to '2855/CH1/EX1.5/Ex1_5.sce')
-rwxr-xr-x | 2855/CH1/EX1.5/Ex1_5.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/2855/CH1/EX1.5/Ex1_5.sce b/2855/CH1/EX1.5/Ex1_5.sce new file mode 100755 index 000000000..7dba1ca7c --- /dev/null +++ b/2855/CH1/EX1.5/Ex1_5.sce @@ -0,0 +1,21 @@ +//Ex1_5
+//given
+//page no 11
+clc;
+clear;
+c=3*10^8;
+disp('Solution (i) is ');
+ri=1.5;//refractive index
+u=830// in nm
+l=u/ri; //in nm
+printf("\n Wavelength is %0.0f nm \n",l);
+disp('Solution (ii) is ');
+l=round(l); // rounding to nearest integer
+f=c/(l*10^-9)*10^-12; //in THz
+printf("\n frequency is %0.0f THz\n",f);
+disp('Solution (iii) is ');
+f=round(f); // rounding to nearest integer
+v=l*10^-9*f*10^12; //in m/s
+mprintf("\n phase velocity is %.3e m/s\n",v);//answer is getting rounding off due to larger calculation
+
+
|