diff options
Diffstat (limited to '1553/CH17')
-rw-r--r-- | 1553/CH17/EX17.1/17Ex1.sce | 11 | ||||
-rw-r--r-- | 1553/CH17/EX17.10/17Ex10.sce | 13 | ||||
-rw-r--r-- | 1553/CH17/EX17.11/17Ex11.sce | 9 | ||||
-rw-r--r-- | 1553/CH17/EX17.12/17Ex12.sce | 13 | ||||
-rw-r--r-- | 1553/CH17/EX17.13/17Ex13.sce | 7 | ||||
-rw-r--r-- | 1553/CH17/EX17.2/17Ex2.sce | 9 | ||||
-rw-r--r-- | 1553/CH17/EX17.4/17Ex4.sce | 15 | ||||
-rw-r--r-- | 1553/CH17/EX17.5/17Ex5.sce | 8 | ||||
-rw-r--r-- | 1553/CH17/EX17.6/17Ex6.sce | 15 | ||||
-rw-r--r-- | 1553/CH17/EX17.7/17Ex7.sce | 7 | ||||
-rw-r--r-- | 1553/CH17/EX17.8/17Ex8.sce | 9 | ||||
-rw-r--r-- | 1553/CH17/EX17.9/17Ex9.sce | 9 |
12 files changed, 125 insertions, 0 deletions
diff --git a/1553/CH17/EX17.1/17Ex1.sce b/1553/CH17/EX17.1/17Ex1.sce new file mode 100644 index 000000000..c8b00ccaf --- /dev/null +++ b/1553/CH17/EX17.1/17Ex1.sce @@ -0,0 +1,11 @@ +//chapter 17: Ex1
+clc;
+clear;
+close;
+dist=400; //distance given
+aspeed=20*5/18; //converting km/hr to m/sec
+t= dist/aspeed;
+//t1=modulo(t,60);
+t2=(t/60);
+printf("The time taken is %1.2f min",t2);
+
diff --git a/1553/CH17/EX17.10/17Ex10.sce b/1553/CH17/EX17.10/17Ex10.sce new file mode 100644 index 000000000..39cc78e5b --- /dev/null +++ b/1553/CH17/EX17.10/17Ex10.sce @@ -0,0 +1,13 @@ +//chapter 17 Ex 10
+
+clc;
+clear;
+close;
+s1=65; s2=35;
+d=390;
+t=(390+s2)/(s1+s2);
+t_hr=round(t);
+t_min=(modulo(t,t_hr))*60;
+t1=10;
+t2_hr=t1+t_hr;
+printf("They meet at %d:%d hour",t2_hr,t_min);
diff --git a/1553/CH17/EX17.11/17Ex11.sce b/1553/CH17/EX17.11/17Ex11.sce new file mode 100644 index 000000000..fa2fa73d7 --- /dev/null +++ b/1553/CH17/EX17.11/17Ex11.sce @@ -0,0 +1,9 @@ +//chapter 17 Ex 11
+
+clc;
+clear;
+close;
+us=90;t1=6;t2=4;
+t=t1+t2;
+s_goods=us*t2/t;
+printf("The speed of goods train is %d km/hr",s_goods);
diff --git a/1553/CH17/EX17.12/17Ex12.sce b/1553/CH17/EX17.12/17Ex12.sce new file mode 100644 index 000000000..a6e2af8dc --- /dev/null +++ b/1553/CH17/EX17.12/17Ex12.sce @@ -0,0 +1,13 @@ +//chapter 17 Ex 12
+
+clc;
+clear;
+close;
+d=100/1000; //converting meter to km
+s_t=8;s_p=10;
+s_relative=s_p-s_t;
+
+t_p=d/s_relative;
+d_t=s_t*t_p;
+dist_theif=d_t*1000;
+printf("The distance covered by theif is %d meter",dist_theif);
diff --git a/1553/CH17/EX17.13/17Ex13.sce b/1553/CH17/EX17.13/17Ex13.sce new file mode 100644 index 000000000..bcb70ebf9 --- /dev/null +++ b/1553/CH17/EX17.13/17Ex13.sce @@ -0,0 +1,7 @@ +//chapter 17: Ex13
+clc;
+clear;
+close;
+walkrideTime=37; walkTime=55;
+rideTime=(2*walkrideTime-walkTime);
+mprintf("It takes %d min to ride both ways",rideTime);
diff --git a/1553/CH17/EX17.2/17Ex2.sce b/1553/CH17/EX17.2/17Ex2.sce new file mode 100644 index 000000000..24d2758aa --- /dev/null +++ b/1553/CH17/EX17.2/17Ex2.sce @@ -0,0 +1,9 @@ +//chapter 17: Ex2
+
+clc;
+clear;
+close;
+dist=750; time=2*60+30; //converting into seconds
+speed=dist/time;
+speedKmhr=speed/(5/18);
+mprintf("The speed of cyclist is %d km/hr",speedKmhr);
diff --git a/1553/CH17/EX17.4/17Ex4.sce b/1553/CH17/EX17.4/17Ex4.sce new file mode 100644 index 000000000..da9e7ae0e --- /dev/null +++ b/1553/CH17/EX17.4/17Ex4.sce @@ -0,0 +1,15 @@ +//chapter 17 Ex4
+clc;
+clear;
+close;
+t=1+(40/60); //time in hours
+//dist=t*s; //distance in km and s is speed
+//remain_dist=24-dist; //remaining distance in km
+//dist=(5/7)*remain_dist;
+
+
+mycoeff=[-72 12];
+p=poly(mycoeff,"x","coeff");
+ans=roots(p);
+speed=ans*5/18; //converting to m/sec
+printf("The speed is %1.2f m/sec",speed);
diff --git a/1553/CH17/EX17.5/17Ex5.sce b/1553/CH17/EX17.5/17Ex5.sce new file mode 100644 index 000000000..0fdebd7b0 --- /dev/null +++ b/1553/CH17/EX17.5/17Ex5.sce @@ -0,0 +1,8 @@ +//chapter 17: Ex5
+clc;
+clear;
+close;
+time=1+(24/60); //converting into hours
+speed1=4; speed2=5; dist1=2/3; dist2=1-dist1;
+distanceTotal=time/(dist1/speed1+dist2/speed2);
+mprintf("Toal distance is %.0f km",distanceTotal);
diff --git a/1553/CH17/EX17.6/17Ex6.sce b/1553/CH17/EX17.6/17Ex6.sce new file mode 100644 index 000000000..dac252640 --- /dev/null +++ b/1553/CH17/EX17.6/17Ex6.sce @@ -0,0 +1,15 @@ +//chapter 17 Ex6
+
+clc;
+clear;
+close;
+s1=25;s2=4; //given speeds in km/hr
+function [s]=average(s1,s2)
+ s=(2*s1*s2)/(s1+s2);
+endfunction
+
+s=average(25,4);
+t=5+(48/60); //converting minutes into hours
+d=t*s; //distance=time*speed
+dpost=d/2;
+printf("The distance of post office from village is %2.0f km",dpost);
diff --git a/1553/CH17/EX17.7/17Ex7.sce b/1553/CH17/EX17.7/17Ex7.sce new file mode 100644 index 000000000..9548f04ef --- /dev/null +++ b/1553/CH17/EX17.7/17Ex7.sce @@ -0,0 +1,7 @@ +//chapter 17 Example 7
+clc;
+clear;
+close;
+s1=200;s2=400;s3=600;s4=800;
+avgspeed=4/(1/s1+1/s2+1/s3+1/s4);
+printf("The average speed is %3.0f km/hr",avgspeed);
diff --git a/1553/CH17/EX17.8/17Ex8.sce b/1553/CH17/EX17.8/17Ex8.sce new file mode 100644 index 000000000..8bb0456e8 --- /dev/null +++ b/1553/CH17/EX17.8/17Ex8.sce @@ -0,0 +1,9 @@ +//chapter 17 Example 8
+
+clc;
+clear;
+close;
+
+tLate=10;
+t=tLate/(6/5-1);
+printf("The usual time to cover the journey is %d min",t);
diff --git a/1553/CH17/EX17.9/17Ex9.sce b/1553/CH17/EX17.9/17Ex9.sce new file mode 100644 index 000000000..9e583e5df --- /dev/null +++ b/1553/CH17/EX17.9/17Ex9.sce @@ -0,0 +1,9 @@ +//chapter 17 Ex 9
+
+clc;
+clear;
+close;
+s1=5;s2=6;t1=7;t2=5;
+difference=(t1+t2)/60; //converting minutes into hours
+dist=difference/(1/s1-1/s2);
+printf("The required distance is %1.0f km",dist);
|