summaryrefslogtreecommitdiff
path: root/24/CH2
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /24/CH2
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 '24/CH2')
-rwxr-xr-x24/CH2/EX2.1.a/Example2_1a.sce10
-rwxr-xr-x24/CH2/EX2.1.a/Example2_1a_result.txt2
-rwxr-xr-x24/CH2/EX2.1.b/Example2_1b.sce8
-rwxr-xr-x24/CH2/EX2.1.b/Example2_1b_result.txt2
-rwxr-xr-x24/CH2/EX2.1.c/Example2_1c.sce30
-rwxr-xr-x24/CH2/EX2.1.c/Example2_1c_graph.jpgbin0 -> 23848 bytes
-rwxr-xr-x24/CH2/EX2.1.c/Example2_1c_result.txt3
-rwxr-xr-x24/CH2/EX2.1.d/Example2_1d.sce12
-rwxr-xr-x24/CH2/EX2.1.d/Example2_1d_result.txt2
-rwxr-xr-x24/CH2/EX2.2/Example2_2.sce42
-rwxr-xr-x24/CH2/EX2.2/Example2_2_graph.jpgbin0 -> 23655 bytes
-rwxr-xr-x24/CH2/EX2.2/Example2_2_result.txt2
-rwxr-xr-x24/CH2/EX2.3/Example2_3.sce9
-rwxr-xr-x24/CH2/EX2.3/Example2_3_result.txt2
-rwxr-xr-x24/CH2/EX2.4/Example2_4.sce18
-rwxr-xr-x24/CH2/EX2.4/Example2_4_result.txt11
-rwxr-xr-x24/CH2/EX2.5/Example2_5.sce17
-rwxr-xr-x24/CH2/EX2.5/Example2_5_result.txt5
-rwxr-xr-x24/CH2/EX2.6/Example2_6.sce33
-rwxr-xr-x24/CH2/EX2.6/Example2_6_result.txt13
-rwxr-xr-x24/CH2/EX2.7/Example2_7.sce26
-rwxr-xr-x24/CH2/EX2.7/Example2_7_result.txt10
22 files changed, 257 insertions, 0 deletions
diff --git a/24/CH2/EX2.1.a/Example2_1a.sce b/24/CH2/EX2.1.a/Example2_1a.sce
new file mode 100755
index 000000000..8bce2b73d
--- /dev/null
+++ b/24/CH2/EX2.1.a/Example2_1a.sce
@@ -0,0 +1,10 @@
+//Given that
+velocity = 70 //in km/h
+distance_covered = 8.4 //in km
+next_time = 30 //in min
+next_walk = 2 //in km
+
+//Sample Problem 2-1a
+printf("**Sample Problem 2-1a**\n")
+overall_displacement = distance_covered + next_walk
+printf("Overall displacement from begining of the drive to the station is %f km", overall_displacement) \ No newline at end of file
diff --git a/24/CH2/EX2.1.a/Example2_1a_result.txt b/24/CH2/EX2.1.a/Example2_1a_result.txt
new file mode 100755
index 000000000..f0ac82971
--- /dev/null
+++ b/24/CH2/EX2.1.a/Example2_1a_result.txt
@@ -0,0 +1,2 @@
+**Sample Problem 2-1a**
+Overall displacement from begining of the drive to the station is 10.400000 km \ No newline at end of file
diff --git a/24/CH2/EX2.1.b/Example2_1b.sce b/24/CH2/EX2.1.b/Example2_1b.sce
new file mode 100755
index 000000000..9d9923e9d
--- /dev/null
+++ b/24/CH2/EX2.1.b/Example2_1b.sce
@@ -0,0 +1,8 @@
+exec('Example2_1a.sce', -1)
+clc
+
+//Sample Problem 2-1b
+printf("\n**Sample Problem 2-1b**\n")
+time = distance_covered / velocity //in hr
+delta_t = time + next_time /60 //in hr
+printf("Time interval from the begining of the drive to the arrival at the station is %f hr", delta_t) \ No newline at end of file
diff --git a/24/CH2/EX2.1.b/Example2_1b_result.txt b/24/CH2/EX2.1.b/Example2_1b_result.txt
new file mode 100755
index 000000000..e801af674
--- /dev/null
+++ b/24/CH2/EX2.1.b/Example2_1b_result.txt
@@ -0,0 +1,2 @@
+**Sample Problem 2-1b**
+Time interval from the begining of the drive to the arrival at the station is 0.620000 hr \ No newline at end of file
diff --git a/24/CH2/EX2.1.c/Example2_1c.sce b/24/CH2/EX2.1.c/Example2_1c.sce
new file mode 100755
index 000000000..504628dcb
--- /dev/null
+++ b/24/CH2/EX2.1.c/Example2_1c.sce
@@ -0,0 +1,30 @@
+exec('Example2_1a.sce', -1)
+clc
+
+//Sample Problem 2-1c
+printf("\n**Sample Problem 2-1c**\n")
+average_velocity = overall_displacement/delta_t
+printf("The average velocity over the whole journey is %f km/h\n", average_velocity)
+
+//from position v/s time graph
+xset('window',1)
+xtitle ("position v/s time","time(hr)","position(Km)");
+//drawing reference lines
+plot(linspace(delta_t,delta_t,10),linspace(0,overall_displacement,10),'--.x')
+plot(linspace(0,delta_t,10),linspace(overall_displacement,overall_displacement,10),'--.o')
+plot(linspace(time,time,10),linspace(0,distance_covered,10),'--')
+plot(linspace(0,time,10),linspace(distance_covered,distance_covered,10),'--')
+//position v/s time graph
+x = linspace(0,time,10);
+y = linspace(0,distance_covered,10);
+plot(x,y,'r');
+//average graph
+x = linspace(time,delta_t,10);
+y = linspace(distance_covered,overall_displacement,10);
+plot(x,y,'r');
+//slope of this line will give us the average velocity
+x = linspace(0,delta_t,10);
+y = linspace(0,overall_displacement,10);
+plot(x,y,'m');
+legend('$\delta x=10.4 km$','time interval=.62hr')
+printf("The average velocity from the graph is %f km/h", 10.4/delta_t) \ No newline at end of file
diff --git a/24/CH2/EX2.1.c/Example2_1c_graph.jpg b/24/CH2/EX2.1.c/Example2_1c_graph.jpg
new file mode 100755
index 000000000..8dc9c59b7
--- /dev/null
+++ b/24/CH2/EX2.1.c/Example2_1c_graph.jpg
Binary files differ
diff --git a/24/CH2/EX2.1.c/Example2_1c_result.txt b/24/CH2/EX2.1.c/Example2_1c_result.txt
new file mode 100755
index 000000000..6ac548f46
--- /dev/null
+++ b/24/CH2/EX2.1.c/Example2_1c_result.txt
@@ -0,0 +1,3 @@
+**Sample Problem 2-1c**
+The average velocity over the whole journey is 16.774194 km/h
+The average velocity from the graph is 16.774194 km/h \ No newline at end of file
diff --git a/24/CH2/EX2.1.d/Example2_1d.sce b/24/CH2/EX2.1.d/Example2_1d.sce
new file mode 100755
index 000000000..49520d56b
--- /dev/null
+++ b/24/CH2/EX2.1.d/Example2_1d.sce
@@ -0,0 +1,12 @@
+//Given that
+exec('Example2_1a.sce', -1)
+exec('Example2_1a.sce', -1)
+clc
+
+//Sample Problem 2-1d
+printf("\n**Sample Probelm 2-1d**\n")
+time_station = 45 //in min
+//he trevels 2 km back to the truck
+final_displacement = overall_displacement + 2 //in km
+final_average_velocity = final_displacement /(delta_t + time_station /60)
+printf("Average velocity from the begining of the drive till reaching back to the truck is %f km/h", final_average_velocity) \ No newline at end of file
diff --git a/24/CH2/EX2.1.d/Example2_1d_result.txt b/24/CH2/EX2.1.d/Example2_1d_result.txt
new file mode 100755
index 000000000..a4c08a955
--- /dev/null
+++ b/24/CH2/EX2.1.d/Example2_1d_result.txt
@@ -0,0 +1,2 @@
+**Sample Probelm 2-1d**
+Average velocity from the begining of the drive till reaching back to the truck is 9.051095 km/h \ No newline at end of file
diff --git a/24/CH2/EX2.2/Example2_2.sce b/24/CH2/EX2.2/Example2_2.sce
new file mode 100755
index 000000000..c7b62bf88
--- /dev/null
+++ b/24/CH2/EX2.2/Example2_2.sce
@@ -0,0 +1,42 @@
+//Sample Problem 2-2
+printf("**Sample Problem 2-2**\n")
+//we know that v=dx/dt
+xset('window',2)
+//velocity v/s time graph
+subplot(2,1,1);
+xtitle ("VELOCITY v/s TIME","time (sec)","velocity (m/s)");
+plot2d(linspace(0,0,10),linspace(0,0,10),style=3,rect=[0,0,10,5]);
+//drawing the graph
+plot(linspace(0,1,10),linspace(0,0,10),'m');
+plot(linspace(1,3,10),linspace(0,4,10),'m');
+plot(linspace(3,8,10),linspace(4,4,10),'m');
+plot(linspace(8,9,10),linspace(4,0,10),'m');
+plot(linspace(9,10,10),linspace(0,0,10),'m');
+//dotted lines
+plot(linspace(0,3,5),linspace(4,4,5),'--');
+plot(linspace(3,3,5),linspace(0,4,5),'--');
+plot(linspace(8,8,5),linspace(0,4,5),'--');
+
+//acceleration v/s time graph
+subplot(2,1,2);
+xtitle("ACCELERATION v/s TIME","time (sec)", "acceleration s(m/s^2)")
+plot2d(linspace(0,0,10),linspace(0,0,10),style=0,rect=[0,-5,10,5]);
+//drawing the graph
+plot(linspace(0,1,5),linspace(0,0,5),'m');
+plot(linspace(1,1,5),linspace(0,2,5),'m');
+plot(linspace(1,3,5),linspace(2,2,5),'m');
+plot(linspace(3,3,5),linspace(2,0,5),'m');
+plot(linspace(3,8,5),linspace(0,0,5),'m');
+plot(linspace(8,8,5),linspace(0,-4,5),'m');
+plot(linspace(8,9,5),linspace(-4,-4,5),'m');
+plot(linspace(9,9,5),linspace(-4,0,5),'m');
+plot(linspace(9,10,5),linspace(0,0,5),'m');
+//dotted lines
+plot(linspace(1,1,5),linspace(-5,0,5),'--');
+plot(linspace(3,3,5),linspace(-5,0,5),'--');
+plot(linspace(8,8,5),linspace(-5,-4,5),'-.');
+plot(linspace(9,9,5),linspace(-5,-4,5),'-.');
+plot(linspace(0,1,5),linspace(2,2,5),'--');
+plot(linspace(0,8,5),linspace(-4,-4,5),'--');
+plot(linspace(1,3,5),linspace(0,0,5),'--');
+plot(linspace(8,9,5),linspace(0,0,5),'--'); \ No newline at end of file
diff --git a/24/CH2/EX2.2/Example2_2_graph.jpg b/24/CH2/EX2.2/Example2_2_graph.jpg
new file mode 100755
index 000000000..04478a734
--- /dev/null
+++ b/24/CH2/EX2.2/Example2_2_graph.jpg
Binary files differ
diff --git a/24/CH2/EX2.2/Example2_2_result.txt b/24/CH2/EX2.2/Example2_2_result.txt
new file mode 100755
index 000000000..dd2dc4b49
--- /dev/null
+++ b/24/CH2/EX2.2/Example2_2_result.txt
@@ -0,0 +1,2 @@
+**Sample Problem 2-2**
+ \ No newline at end of file
diff --git a/24/CH2/EX2.3/Example2_3.sce b/24/CH2/EX2.3/Example2_3.sce
new file mode 100755
index 000000000..fef1ed5ee
--- /dev/null
+++ b/24/CH2/EX2.3/Example2_3.sce
@@ -0,0 +1,9 @@
+//Given that
+t = poly(0,'t');
+x = 7.8 + 9.2 * t - 2.1 * t^3;
+
+//Sample Problem 2-3
+printf("**Sample Problem 2-3**\n")
+v = derivat(x)
+velocity = horner(v,3.5)
+printf("Velocity at t=3.5 second is equal to %f m/s", velocity) \ No newline at end of file
diff --git a/24/CH2/EX2.3/Example2_3_result.txt b/24/CH2/EX2.3/Example2_3_result.txt
new file mode 100755
index 000000000..37a1ed7de
--- /dev/null
+++ b/24/CH2/EX2.3/Example2_3_result.txt
@@ -0,0 +1,2 @@
+**Sample Problem 2-3**
+Velocity at t=3.5 second is equal to -67.975000 m/s \ No newline at end of file
diff --git a/24/CH2/EX2.4/Example2_4.sce b/24/CH2/EX2.4/Example2_4.sce
new file mode 100755
index 000000000..f1c7e2776
--- /dev/null
+++ b/24/CH2/EX2.4/Example2_4.sce
@@ -0,0 +1,18 @@
+//Given that
+t = poly(0,'t')
+x = t^3 - 27 * t + 4
+
+//Sample Problem 2-4a
+printf("**Sample Problem 2-4a**\n")
+velocity = derivat(x)
+acceleration = derivat(velocity)
+printf("The velocity as a function of time in m/s is")
+disp(velocity)
+printf("The acceleration as a function of time in m/s^2 is")
+disp(acceleration)
+
+//Sample Problem 2-4b
+printf("\n**Sample Problem 2-4b**\n")
+v0 = roots(velocity)
+printf("velocity of the particle is zero at times in sec")
+disp(v0) \ No newline at end of file
diff --git a/24/CH2/EX2.4/Example2_4_result.txt b/24/CH2/EX2.4/Example2_4_result.txt
new file mode 100755
index 000000000..5912cd5e6
--- /dev/null
+++ b/24/CH2/EX2.4/Example2_4_result.txt
@@ -0,0 +1,11 @@
+**Sample Problem 2-4a**
+The velocity as a function of time in m/s is
+ 2
+ - 27 + 3t
+The acceleration as a function of time in m/s^2 is
+ 6t
+
+**Sample Problem 2-4b**
+velocity of the particle is zero at times in sec
+ 3.
+ - 3. \ No newline at end of file
diff --git a/24/CH2/EX2.5/Example2_5.sce b/24/CH2/EX2.5/Example2_5.sce
new file mode 100755
index 000000000..7fd619bed
--- /dev/null
+++ b/24/CH2/EX2.5/Example2_5.sce
@@ -0,0 +1,17 @@
+//Given that
+conv = 5/18 //converts velocity from km/h to in m/s
+speed_initial = 100 * conv //in km/h
+speed_final = 80 * conv //in km/h
+displacement = 88 //in meter
+
+//Sample Problem 2-5a
+printf("**Sample Problem 2-5a\n")
+//using newton's 3rd equation of motion
+acceleration = (speed_final^2 - speed_initial^2)/(2 * displacement)
+printf("The acceleration is equal to %f m/sec^2\n", acceleration)
+
+//Sample Problem2-5b
+printf("\n**Sample Problem 2-5a**\n")
+//using newton's first equation of motion
+time = (speed_final - speed_initial)/acceleration
+printf("The time taken to decrease the speed is %f sec", time) \ No newline at end of file
diff --git a/24/CH2/EX2.5/Example2_5_result.txt b/24/CH2/EX2.5/Example2_5_result.txt
new file mode 100755
index 000000000..089b87e54
--- /dev/null
+++ b/24/CH2/EX2.5/Example2_5_result.txt
@@ -0,0 +1,5 @@
+**Sample Problem 2-5a
+The acceleration is equal to -1.578283 m/sec^2
+
+**Sample Problem 2-5a**
+The time taken to decrease the speed is 3.520000 sec \ No newline at end of file
diff --git a/24/CH2/EX2.6/Example2_6.sce b/24/CH2/EX2.6/Example2_6.sce
new file mode 100755
index 000000000..d5e1987a9
--- /dev/null
+++ b/24/CH2/EX2.6/Example2_6.sce
@@ -0,0 +1,33 @@
+//Given that
+g = -9.8 //in m/sec^2
+displacement = -48 //in meter
+
+//Sample Problem 2-6a
+printf("**Sample Problem 2-6a**\n")
+//using newton's equation of motion
+//displacement = 0 * t + .5 * g * t * t
+//displacement = .5 * g * t * t
+time = sqrt(displacement/(.5 * g))
+printf("The time taken to reach at the ground is %f sec\n", time)
+
+//Sample Problem 2-6b
+printf("\n**Sample Problem 2-6b**\n")
+t = poly(0,'t');
+dis_t = 0 * t + .5 * g *t * t
+ds = horner(dis_t,[1,2,3])
+printf("The displacements at times 1,2,3 sec in meter is")
+disp(ds)
+
+//Sample Problem 2-6c
+printf("\n**Sample Problem 2-6c**\n")
+//using newton's first equation of motion v = u + a*t
+velocity = 0 + g * time
+printf("The velocity at water surface is equal to %f km/h\n", velocity)
+
+//Sample Problem 2-6d
+printf("\n**Sample Problem 2-6d**\n")
+//using newton's first equation of motion
+v_at_time_t = 0 + g * t
+velocities = horner(v_at_time_t,[1,2,3])
+printf("The velocitis at times 1,2,3 sec in m/s is")
+disp(velocities) \ No newline at end of file
diff --git a/24/CH2/EX2.6/Example2_6_result.txt b/24/CH2/EX2.6/Example2_6_result.txt
new file mode 100755
index 000000000..868c2e990
--- /dev/null
+++ b/24/CH2/EX2.6/Example2_6_result.txt
@@ -0,0 +1,13 @@
+**Sample Problem 2-6a**
+The time taken to reach at the ground is 3.129843 sec
+
+**Sample Problem 2-6b**
+The displacements at times 1,2,3 sec in meter is
+ - 4.9 - 19.6 - 44.1
+
+**Sample Problem 2-6c**
+The velocity at water surface is equal to -30.672463 km/h
+
+**Sample Problem 2-6d**
+The velocitis at times 1,2,3 sec in m/s is
+ - 9.8 - 19.6 - 29.4 \ No newline at end of file
diff --git a/24/CH2/EX2.7/Example2_7.sce b/24/CH2/EX2.7/Example2_7.sce
new file mode 100755
index 000000000..f882519fd
--- /dev/null
+++ b/24/CH2/EX2.7/Example2_7.sce
@@ -0,0 +1,26 @@
+//Given that
+g = -9.8 //in m/sec^2
+v_initial = 12 //in m/s
+v_final = 0 //at maximum height velocity equal to zero
+
+//Sample Problem 2-7a
+printf("**Sample Problem 2-7a**\n")
+//using newton'd first equation of motion
+// v_final = v_initial + g * t
+h_max_time = (v_final - v_initial)/g
+printf("After %f sec, the ball will attain its maximum height\n", h_max_time)
+
+//Sample Problem 2-7b
+printf("\n**Sample Problem 2-7b**\n")
+//using newton's second equation of motion
+h_max = (v_final^2 - v_initial^2)/(2 * g)
+printf("The maximum height reached by the baseball is %f m\n", h_max)
+
+//Sample Problem 2-7c
+printf("\n**Sample Problem 2-7c**\n")
+displacement = 5
+t = poly(0,'t')
+quad_t = v_initial * t + .5 * g * t * t - displacement
+t_5 = roots(quad_t)
+printf("At following times in sec, the ball will be at height 5m")
+disp(t_5) \ No newline at end of file
diff --git a/24/CH2/EX2.7/Example2_7_result.txt b/24/CH2/EX2.7/Example2_7_result.txt
new file mode 100755
index 000000000..88b0bc094
--- /dev/null
+++ b/24/CH2/EX2.7/Example2_7_result.txt
@@ -0,0 +1,10 @@
+**Sample Problem 2-7a**
+After 1.224490 sec, the ball will attain its maximum height
+
+**Sample Problem 2-7b**
+The maximum height reached by the baseball is 7.346939 m
+
+**Sample Problem 2-7c**
+At following times in sec, the ball will be at height 5m
+ 0.5324153
+ 1.9165643 \ No newline at end of file