summaryrefslogtreecommitdiff
path: root/3480
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /3480
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '3480')
-rw-r--r--3480/CH11/EX11.1/Ex11_1.sce22
-rw-r--r--3480/CH11/EX11.2/Ex11_2.sce18
-rw-r--r--3480/CH3/EX3.1/Ex3_1.sce9
-rw-r--r--3480/CH3/EX3.2/Ex3_2.sce13
-rw-r--r--3480/CH3/EX3.3/Ex3_3.sce11
-rw-r--r--3480/CH3/EX3.4/Ex3_4.sce8
-rw-r--r--3480/CH4/EX4.1/Ex4_1.sce7
-rw-r--r--3480/CH4/EX4.2/Ex4_2.sce7
-rw-r--r--3480/CH4/EX4.3/Ex4_3.sce6
-rw-r--r--3480/CH4/EX4.4/Ex4_4.sce7
-rw-r--r--3480/CH5/EX5.1/Ex5_1.sce9
-rw-r--r--3480/CH5/EX5.2/Ex5_2.sce37
-rw-r--r--3480/CH5/EX5.3/Ex5_3.sce7
-rw-r--r--3480/CH5/EX5.4/Ex5_4.sce28
-rw-r--r--3480/CH6/EX6.1/Ex6_1.sce13
-rw-r--r--3480/CH6/EX6.2/Ex6_2.sce11
-rw-r--r--3480/CH6/EX6.3/Ex6_3.sce16
-rw-r--r--3480/CH8/EX8.1/Ex8_1.sce28
-rw-r--r--3480/CH8/EX8.2/Ex8_2.sce53
19 files changed, 310 insertions, 0 deletions
diff --git a/3480/CH11/EX11.1/Ex11_1.sce b/3480/CH11/EX11.1/Ex11_1.sce
new file mode 100644
index 000000000..da9b0782e
--- /dev/null
+++ b/3480/CH11/EX11.1/Ex11_1.sce
@@ -0,0 +1,22 @@
+clc
+
+m=4 //kg
+x=0.180 //m
+g=9.80 //m/s^2
+
+//solution a:
+F=m*g
+k=F/x
+disp(k,"the spring constant k in N/m is=")
+
+//sloution b:
+T=2*%pi*sqrt(m/k)
+disp(T,"the period T in sec is=")
+
+//solution c:
+v=1/T
+disp(v,"the frequency v in hz is")
+
+//solution d:
+W=0.5*k*x^2
+disp(W,"the total energy stored in Nm is=")
diff --git a/3480/CH11/EX11.2/Ex11_2.sce b/3480/CH11/EX11.2/Ex11_2.sce
new file mode 100644
index 000000000..2d5dc2f01
--- /dev/null
+++ b/3480/CH11/EX11.2/Ex11_2.sce
@@ -0,0 +1,18 @@
+clc
+
+T=5// sec
+a=3// cm
+alpha=%pi/3
+w=(2*%pi/T)
+//solution a:
+//for
+t=0//sec
+y=a*sin(w*t+alpha)
+disp(y,"y in cm is=")
+
+//solution b:
+//for
+t=12//sec
+y=a*sin(w*t+alpha)
+disp(y,"y in cm is=")
+
diff --git a/3480/CH3/EX3.1/Ex3_1.sce b/3480/CH3/EX3.1/Ex3_1.sce
new file mode 100644
index 000000000..8b44b9727
--- /dev/null
+++ b/3480/CH3/EX3.1/Ex3_1.sce
@@ -0,0 +1,9 @@
+//Example 3.1, page 69
+clc;
+n1=1.5
+r=1//in cm
+n=1//in cm
+a=4//in cm, air
+s=.5-(1/a)
+s1=n1/s
+printf("\n The image is formed at %d cm",s1) \ No newline at end of file
diff --git a/3480/CH3/EX3.2/Ex3_2.sce b/3480/CH3/EX3.2/Ex3_2.sce
new file mode 100644
index 000000000..e4783f0e0
--- /dev/null
+++ b/3480/CH3/EX3.2/Ex3_2.sce
@@ -0,0 +1,13 @@
+//Example 3.2, page 71
+clc
+n=1
+n1=1.5
+r=-4//in cm
+s=10//in cm
+f=(n*r)/(n1-n)
+f1=(n1*r)/(n1-n)
+s_temp=(1/-8)-(1/s)
+s1=n1/s_temp
+printf("\n The primary focal length is %d cm",f)
+printf("\n The secondary focal length is formed at %d cm",f1)
+printf("\n The image distance is %f cm",s1) \ No newline at end of file
diff --git a/3480/CH3/EX3.3/Ex3_3.sce b/3480/CH3/EX3.3/Ex3_3.sce
new file mode 100644
index 000000000..54d37291d
--- /dev/null
+++ b/3480/CH3/EX3.3/Ex3_3.sce
@@ -0,0 +1,11 @@
+//Example 3.3, page 77
+clc
+n=1
+n1=1.5
+r=10//in cm
+s=40//in cm
+p=(n1-n)/.1
+v1=n/.4
+s1=n1/v1
+printf("\n The power of image is %dD",p)
+printf("\n The image distance is %f m",s1) \ No newline at end of file
diff --git a/3480/CH3/EX3.4/Ex3_4.sce b/3480/CH3/EX3.4/Ex3_4.sce
new file mode 100644
index 000000000..28f5de4b0
--- /dev/null
+++ b/3480/CH3/EX3.4/Ex3_4.sce
@@ -0,0 +1,8 @@
+//Example 3.4, page 78
+clc
+n=1
+n1=1.5
+r=2//in cm
+s=12//in cm
+f=r/(n1-n)
+printf("\n The focal length is %d cm",f) \ No newline at end of file
diff --git a/3480/CH4/EX4.1/Ex4_1.sce b/3480/CH4/EX4.1/Ex4_1.sce
new file mode 100644
index 000000000..01df4e794
--- /dev/null
+++ b/3480/CH4/EX4.1/Ex4_1.sce
@@ -0,0 +1,7 @@
+//example 4.1, page 86
+clc
+s=6//in cm
+f=10//in cm
+s1=(s*f)/(s-f)
+m=s1/s
+printf("\n The magnification obtained is %fX",m) \ No newline at end of file
diff --git a/3480/CH4/EX4.2/Ex4_2.sce b/3480/CH4/EX4.2/Ex4_2.sce
new file mode 100644
index 000000000..e4af8e0a4
--- /dev/null
+++ b/3480/CH4/EX4.2/Ex4_2.sce
@@ -0,0 +1,7 @@
+//example 4.2, page 86
+clc
+s=12//in cm
+f=-6//in cm
+s1=(s*f)/(s-f)
+m=s1/s
+printf("\n The magnification obtained is %fX",m) \ No newline at end of file
diff --git a/3480/CH4/EX4.3/Ex4_3.sce b/3480/CH4/EX4.3/Ex4_3.sce
new file mode 100644
index 000000000..3dccea4b6
--- /dev/null
+++ b/3480/CH4/EX4.3/Ex4_3.sce
@@ -0,0 +1,6 @@
+//Example 4.3, page 89
+clc
+n=1.520
+f=25//in cm
+r2=-(f*(n-1))
+printf("\n The radius of curvature is %f cm",r2) \ No newline at end of file
diff --git a/3480/CH4/EX4.4/Ex4_4.sce b/3480/CH4/EX4.4/Ex4_4.sce
new file mode 100644
index 000000000..9c070b814
--- /dev/null
+++ b/3480/CH4/EX4.4/Ex4_4.sce
@@ -0,0 +1,7 @@
+//example 4.4, page 92
+clc
+n=1.6
+r1=.080//in cm
+r2=-0.080
+P=(n-1)*((1/r1)-(1/r2))
+printf("\n The power is %f D",P) \ No newline at end of file
diff --git a/3480/CH5/EX5.1/Ex5_1.sce b/3480/CH5/EX5.1/Ex5_1.sce
new file mode 100644
index 000000000..50119c7c7
--- /dev/null
+++ b/3480/CH5/EX5.1/Ex5_1.sce
@@ -0,0 +1,9 @@
+//Example 5.1, page no 101
+clc
+n_air=1//refractive index of air
+n_glass=1.5//refractive index of glass
+n_water=1.33//refractive index of water
+s1=n_glass/(((n_glass-n_air)/2)-(n_air/5))
+s2=n_water/(((n_water-n_glass)/-2)-(n_glass/-28))
+printf("\n The value of s1 is +%f cm",s1)
+printf("\n The value of s2 is +%f cm",s2) \ No newline at end of file
diff --git a/3480/CH5/EX5.2/Ex5_2.sce b/3480/CH5/EX5.2/Ex5_2.sce
new file mode 100644
index 000000000..61baa8b33
--- /dev/null
+++ b/3480/CH5/EX5.2/Ex5_2.sce
@@ -0,0 +1,37 @@
+//Example 5.2, page 107
+clc
+r1=1.5//in cm
+r2=1.5//in cm
+d=2//in cm
+n=1//in cm
+n1=1.60//in cm
+n11=1.30//in cm
+n_by_f1=(n1-n)/r1
+n1_by_f21=(n11-n1)/r2
+f1=n/n_by_f1
+f11=n1/n_by_f1
+f21=n1/n1_by_f21
+f211=n11/n1_by_f21
+disp("Part a")
+printf("\n The focal length f1 is +%f cm",f1)
+printf("\n The focal length f11 is +%f cm",f11)
+printf("\n The focal length f21 is -%f cm",f21)
+printf("\n The focal length f211 is -%f cm",f211)
+n_by_f=(n1/f11)+(n11/f211)-((d*n11)/(f11*f211))
+f=1/n_by_f
+f11=n11/n_by_f
+A1_f=(-f)*(1-(d/f21))
+A2_f211=f11*(1-(d/f11))
+disp("Part b")
+printf("\n The primary focal length is %f cm",A1_f)
+printf("\n The secondary focal length is %f cm",A2_f211)
+A1_h=f*(d/f21)
+A2_h11=-f11*(d/f11)
+disp("Part c")
+printf("\n The primary point is %f cm",A1_h)
+printf("\n The secondary point is %f cm",A2_h11)
+
+
+
+
+
diff --git a/3480/CH5/EX5.3/Ex5_3.sce b/3480/CH5/EX5.3/Ex5_3.sce
new file mode 100644
index 000000000..049d7ddeb
--- /dev/null
+++ b/3480/CH5/EX5.3/Ex5_3.sce
@@ -0,0 +1,7 @@
+//Example 5.3, Page 111
+clc
+n=1
+n11=1.3
+f11=4.333//in cm
+HN=f11*((n11-n)/n11)
+printf("Nodal length is %f cm",HN) \ No newline at end of file
diff --git a/3480/CH5/EX5.4/Ex5_4.sce b/3480/CH5/EX5.4/Ex5_4.sce
new file mode 100644
index 000000000..541b7758b
--- /dev/null
+++ b/3480/CH5/EX5.4/Ex5_4.sce
@@ -0,0 +1,28 @@
+//Example 5.4, page 113
+clc
+n1=1.50
+n2=1.60
+n_dash=1.33
+n_doubledash=1
+p1=((n1-n_doubledash)/.04)+((n_dash-n1)/-0.04)
+p2=((n2-n_dash)/-.06)+((n_doubledash-n2)/.06)
+p=p1+p2+(-.015*p1*p2)
+printf("The power is %f D", p)
+//Part b
+f=1/p
+f_doubledash=1/p
+printf("\nThe focal length f is %f m",f)
+printf("\n The focal length f'' is %f m",f_doubledash)
+//Part c
+A1f=-(1/p)*(1+(.015*14.45))
+A2H=-(1/p)*((.015*-4.45))
+A2f11=-(1/p)*(1-(.015*16.67))
+printf("\nThe focal point A1F is %f m",A1f)
+printf("\nThe focal point A2H is %f m",A2H)
+printf("\nThe focal point A2F11 is %f m",A2f11)
+//Part d
+A2H11=(1/p)*0.015*16.67
+printf("\nThe principal point is %f m",A2H11)
+
+
+
diff --git a/3480/CH6/EX6.1/Ex6_1.sce b/3480/CH6/EX6.1/Ex6_1.sce
new file mode 100644
index 000000000..7a8f9ff50
--- /dev/null
+++ b/3480/CH6/EX6.1/Ex6_1.sce
@@ -0,0 +1,13 @@
+//Example 6.1, Page 125
+clc
+y=2//in cm
+s=10//in cm
+r=-16//in cm
+//Part a
+f=-r/2
+printf("\n The focal length is %f cm",f)
+s1=1/((1/f)-(1/s))
+printf("\n The position of image is formed at %f cm",s1)
+//part c
+m=-(s1/s)
+printf("\n The inveted position of image is formed at %f cm",m) \ No newline at end of file
diff --git a/3480/CH6/EX6.2/Ex6_2.sce b/3480/CH6/EX6.2/Ex6_2.sce
new file mode 100644
index 000000000..21788b28d
--- /dev/null
+++ b/3480/CH6/EX6.2/Ex6_2.sce
@@ -0,0 +1,11 @@
+//Example 6.2, page 126
+clc
+k=1/.5
+v=1/.2
+v1=-4-5
+p=-2*k
+s1=-(1/v1)
+m=-(5/v1)
+printf("The power is %f D", p)
+printf("\n The position of image is formed at %f m",s1)
+printf("\n The magnification of image is %f cm",m) \ No newline at end of file
diff --git a/3480/CH6/EX6.3/Ex6_3.sce b/3480/CH6/EX6.3/Ex6_3.sce
new file mode 100644
index 000000000..8284709c8
--- /dev/null
+++ b/3480/CH6/EX6.3/Ex6_3.sce
@@ -0,0 +1,16 @@
+//Example 6.3, page 129
+clc
+n1=1.50
+r1=.5//in m
+r2=-.5//in m
+d=.1//in cm
+r=-0.5//radius in cm
+p1=(n1-1)*((1/r1)-(1/r2))
+p2=-2*(1/r2)
+c=d/1
+p=(1-(c*2))*(8-.8)
+f=1/p
+H1H=(c)/(1-(c*2))
+printf("The power is %f D", p)
+printf("\nThe focal length f is %f m",f)
+printf("\nThe principal point is %f m",H1H) \ No newline at end of file
diff --git a/3480/CH8/EX8.1/Ex8_1.sce b/3480/CH8/EX8.1/Ex8_1.sce
new file mode 100644
index 000000000..4adc7c1a9
--- /dev/null
+++ b/3480/CH8/EX8.1/Ex8_1.sce
@@ -0,0 +1,28 @@
+//Example 8.1, page 157
+clc
+r=5//in cm
+n=1//in cm
+n1=1.67200//in cm
+for h = 1:3 //the calculations for h=0 is 0, the textbook ans is wrong
+ sin_ph=h/r
+ sin_ph_1=(sin_ph)*(n/n1)
+ ph=asind(sin_ph)
+ ph_1=asind(sin_ph_1)
+ theta=ph_1-ph
+ angle=sin(theta) // the textbook ans is wrong
+ printf("\n \n")
+ printf("\n For h=%d, sin_ph=%f ",h,sin_ph)
+ printf("\n \n")
+ printf("\n For h=%d, sin_ph1=%f ",h,sin_ph_1)
+ printf("\n \n")
+ printf("\n \n")
+ printf("\n For h=%d, ph=%f ",h,ph)
+ printf("\n \n")
+ printf("\n For h=%d, ph1=%f ",h,ph_1)
+ printf("\n \n")
+ printf("\n For h=%d, theta=%f ",h,theta)
+ printf("\n \n")
+ printf("\n For h=%d, angle=%f ",h,angle)
+
+end
+
diff --git a/3480/CH8/EX8.2/Ex8_2.sce b/3480/CH8/EX8.2/Ex8_2.sce
new file mode 100644
index 000000000..fc2ff9b22
--- /dev/null
+++ b/3480/CH8/EX8.2/Ex8_2.sce
@@ -0,0 +1,53 @@
+//Example 8.2
+clc
+r1=15//in cm
+r2=-15 //in cm
+d=3//in cm
+n=1//in cm
+n1=1.62500//in cm
+n2=1//in cm
+for h = 2:2:7 //the calculations for h=0 is 0, the textbook ans is wrong
+ sin_ph=h/r1
+ sin_ph1=(sin_ph)*(n/n1)
+ ph= asind(sin_ph)
+ ph_1=asind(sin_ph1)
+ theta=ph_1-ph
+ angle=r1*(sin_ph/sin(theta))
+ s1=sin_ph/sin(theta)
+ s2=d-s1
+ sin_ph2=(1+(s2/r2))*sin(theta)
+ sin_ph3=(sin_ph2)*(n1/n2)
+ ph_2=asind((1+(s2/r2))*sin(theta))
+ ph_3=asind((sin_ph2)*(n1/n2))
+ theta1=ph_3+theta-ph_2
+ angle1=r2*(sin_ph3/sin(theta))
+ printf("\n \n")
+ printf("\n For h=%d, sin_ph=%f ",h,sin_ph)
+ printf("\n \n")
+ printf("\n For h=%d, sin_ph1=%f ",h,sin_ph1)
+ printf("\n \n")
+ printf("\n \n")
+ printf("\n For h=%d, ph=%f ",h,ph)
+ printf("\n \n")
+ printf("\n For h=%d, ph_1=%f ",h,ph_1)
+ printf("\n \n")
+ printf("\n For h=%d, theta=%f ",h,theta)
+ printf("\n \n")
+ printf("\n For h=%d, angle=%f ",h,angle)
+ printf("\n \n")
+ printf("\n For h=%d, s2=%f ",h,s2)
+ printf("\n \n")
+ printf("\n For h=%d, sin_ph2=%f ",h,sin_ph2)
+ printf("\n \n")
+ printf("\n For h=%d, sin_ph3=%f ",h,sin_ph3)
+ printf("\n \n")
+ printf("\n \n")
+ printf("\n For h=%d, ph_2=%f ",h,ph_2)
+ printf("\n \n")
+ printf("\n For h=%d, ph_3=%f ",h,ph_3)
+ printf("\n \n")
+ printf("\n For h=%d, theta1=%f ",h,theta1)
+ printf("\n \n")
+ printf("\n For h=%d, angle1=%f ",h,angle1)
+
+end