diff options
Diffstat (limited to '1553/CH19')
-rw-r--r-- | 1553/CH19/EX19.1/19Ex1.sce | 9 | ||||
-rw-r--r-- | 1553/CH19/EX19.2/19Ex2.sce | 10 | ||||
-rw-r--r-- | 1553/CH19/EX19.3/19Ex3.sce | 9 | ||||
-rw-r--r-- | 1553/CH19/EX19.4/19Ex4.sce | 16 | ||||
-rw-r--r-- | 1553/CH19/EX19.5/19Ex5.sce | 11 | ||||
-rw-r--r-- | 1553/CH19/EX19.6/19Ex6.sce | 13 | ||||
-rw-r--r-- | 1553/CH19/EX19.7/19Ex7.sce | 26 |
7 files changed, 94 insertions, 0 deletions
diff --git a/1553/CH19/EX19.1/19Ex1.sce b/1553/CH19/EX19.1/19Ex1.sce new file mode 100644 index 000000000..19da613c2 --- /dev/null +++ b/1553/CH19/EX19.1/19Ex1.sce @@ -0,0 +1,9 @@ +//chapter 19 Ex 1
+
+clc;
+clear;
+close;
+sUpstream=7; sDownstream=10;
+rStill=(sUpstream+sDownstream)/2;
+rCurrent=(sDownstream-sUpstream)/2;
+printf("The rate of man in still water is %1.1f km/hr and rate of current is %1.1f km/hr",rStill,rCurrent);
diff --git a/1553/CH19/EX19.2/19Ex2.sce b/1553/CH19/EX19.2/19Ex2.sce new file mode 100644 index 000000000..01bc89d2f --- /dev/null +++ b/1553/CH19/EX19.2/19Ex2.sce @@ -0,0 +1,10 @@ +//chapter 19 Ex 2
+
+clc;
+clear;
+close;
+dDown=15; dUp=5; tDown=3+(45/60); tUp=2+(30/60);
+rDown=dDown/tDown;
+rUp=dUp/tUp;
+sCurrent=(rDown-rUp)/2;
+printf("The speed of current is %d km/hr",sCurrent);
diff --git a/1553/CH19/EX19.3/19Ex3.sce b/1553/CH19/EX19.3/19Ex3.sce new file mode 100644 index 000000000..500d3241d --- /dev/null +++ b/1553/CH19/EX19.3/19Ex3.sce @@ -0,0 +1,9 @@ +//chapter 19 Ex 3
+
+clc;
+clear;
+close;
+
+rUp=9; rDown=27;
+rStream=(rDown-rUp)/2;
+printf("The rate of stream is %d km/hr",rStream);
diff --git a/1553/CH19/EX19.4/19Ex4.sce b/1553/CH19/EX19.4/19Ex4.sce new file mode 100644 index 000000000..f693a36bc --- /dev/null +++ b/1553/CH19/EX19.4/19Ex4.sce @@ -0,0 +1,16 @@ +//chapter 19 Ex 4
+
+clc;
+clear;
+close;
+
+sCycle=12; sBoat=10; sRiver=4;
+sAvgCyclist=12; //since the speed of cyclist is same in both directions
+sDown=sBoat+sRiver;
+sUp=sBoat-sRiver;
+sAvgSailor=(2*sDown*sUp)/(sDown+sUp);
+if(sAvgCyclist>sAvgSailor)
+ {printf("The cyclist will return to place A first");}
+
+else{printf("The sailor will return to place A first");}
+ end
diff --git a/1553/CH19/EX19.5/19Ex5.sce b/1553/CH19/EX19.5/19Ex5.sce new file mode 100644 index 000000000..5d5423921 --- /dev/null +++ b/1553/CH19/EX19.5/19Ex5.sce @@ -0,0 +1,11 @@ +//chapter 19 Ex 5
+
+clc;
+clear;
+close;
+sStill=7.5; sRiver=1.5; tTotal=50/60;
+sDown=sStill+sRiver;
+sUp=sStill-sRiver;
+
+dist=tTotal/(1/sDown+1/sUp);
+printf("The required distance is %d km",dist);
diff --git a/1553/CH19/EX19.6/19Ex6.sce b/1553/CH19/EX19.6/19Ex6.sce new file mode 100644 index 000000000..7452066f1 --- /dev/null +++ b/1553/CH19/EX19.6/19Ex6.sce @@ -0,0 +1,13 @@ +//chapter 19 Ex 6
+
+clc;
+clear;
+close;
+sStream=2; dist=6; t=33/60;
+//let sBoat be x, thus (6/(x-2)+6/(x+2))=33/60; solving this we get the equation as
+// 11x^2-240x-44=0
+
+ mycoeff=[-44 -240 11];
+p=poly(mycoeff,"x","coeff");
+r=abs(roots(p)); //absolute since the speed cannot be negative
+printf("The speed of motorboat in still water is %d km/hr",r(1));
diff --git a/1553/CH19/EX19.7/19Ex7.sce b/1553/CH19/EX19.7/19Ex7.sce new file mode 100644 index 000000000..59591f9ed --- /dev/null +++ b/1553/CH19/EX19.7/19Ex7.sce @@ -0,0 +1,26 @@ +//chapter 19 Ex 7
+
+clc;
+clear;
+close;
+dUp1=40; dDown1=55; dUp2=30; dDown=44;
+t1=13; t2=10;
+//let rate upstream be x km/hr and downstream be y km/hr
+//Equations are : 40/x+55/y=13 & 30/x+44/y=10
+x=poly(0,'x');
+y=(-55*x)/(40-13*x); //equation 1
+y=(-44*x)/(30-10*x); //equation 2
+for x=1:99
+ if(x~=3) //since denominator becomes 0
+ if (-55*x)/(40-13*x) ==(-44*x)/(30-10*x)
+ mprintf("x=%i \n ",x);
+ break
+ end
+ end
+end
+
+y=(-55*x)/(40-13*x);
+
+rStill=(x+y)/2;
+rCurrent=(y-x)/2;
+printf("The speed in still water is %d km/hr and rate of current is %d km/hr",rStill,rCurrent);
|