summaryrefslogtreecommitdiff
path: root/149
diff options
context:
space:
mode:
Diffstat (limited to '149')
-rwxr-xr-x149/CH13/EX13.5/ques5.sce17
-rwxr-xr-x149/CH2/EX2.16/ex16.sce16
-rwxr-xr-x149/CH23/EX23.2/ex2.sce76
-rwxr-xr-x149/CH23/EX23.8/ex8.sce88
-rwxr-xr-x149/CH34/EX34.34/example34.sce18
5 files changed, 108 insertions, 107 deletions
diff --git a/149/CH13/EX13.5/ques5.sce b/149/CH13/EX13.5/ques5.sce
index b62892aff..68362bbae 100755
--- a/149/CH13/EX13.5/ques5.sce
+++ b/149/CH13/EX13.5/ques5.sce
@@ -1,9 +1,10 @@
-//ques5
-clc
-disp('solution of the given linear differential equation is given by : ');
-m=poly(0,'m');
-f=m^2+5*m+6;
-//for particular solution a=1
-y=exp(x)/horner(f,1);
-disp('y-');
+//ques5
+clc
+syms x
+disp('solution of the given linear differential equation is given by : ');
+m=poly(0,'m');
+f=m^2+5*m+6;
+//for particular solution a=1
+y=exp(x)/horner(f,1);
+disp('y-');
disp(y); \ No newline at end of file
diff --git a/149/CH2/EX2.16/ex16.sce b/149/CH2/EX2.16/ex16.sce
index a232e0e94..c01728a6a 100755
--- a/149/CH2/EX2.16/ex16.sce
+++ b/149/CH2/EX2.16/ex16.sce
@@ -1,8 +1,8 @@
-clear
-clc
-A=[0 1 2;1 2 3;2 3 4]
-B=[1 -2;-1 0;2 -1]
-disp("AB= ")
-A*B
-disp("BA= ")
-B*A \ No newline at end of file
+clear
+clc
+A=[0 1 2;1 2 3;2 3 4]
+B=[1 -2;-1 0;2 -1]
+disp("AB= ")
+A*B
+disp("BA= ")
+B'*A \ No newline at end of file
diff --git a/149/CH23/EX23.2/ex2.sce b/149/CH23/EX23.2/ex2.sce
index a911a74f7..313e9064a 100755
--- a/149/CH23/EX23.2/ex2.sce
+++ b/149/CH23/EX23.2/ex2.sce
@@ -1,39 +1,39 @@
-clc
-disp('the first row of A represents the mid values of weekly earnings having interval of 2 in each class=x')
-A(1,:)=[11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41]
-disp('the second row denotes the no. of employees or in other words frequency=f')
-A(2,:)=[3 6 10 15 24 42 75 90 79 55 36 26 19 13 9 7]
-disp('third row denotes f*x')
-for i=1:16
- A(3,i)=A(1,i)*A(2,i);
-end
-disp('fourth row denotes u=(x-25)/2')
-for i=1:16
- A(4,i)=(A(1,i)-25)/2
-end
-disp('fifth row denotes f*x')
-for i=1:16
- A(5,i)=A(4,i)*A(2,i);
-end
-A
-b=0;
-disp('sum of all elements of third row=')
-for i=1:16
- b+=A(3,i)
-end
-disp(b)
-f=0;
-disp('sum of all elements of second row=')
-for i=1:16
- f+=A(2,i)
-end
-disp(f)
-disp('mean=')
-b/f
-d=0;
-disp('sum of all elements of fifth row=')
-for i=1:16
- d+=A(5,i)
-end
-disp('mean by step deviation method=')
+clc
+disp('the first row of A represents the mid values of weekly earnings having interval of 2 in each class=x')
+A(1,:)=[11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41]
+disp('the second row denotes the no. of employees or in other words frequency=f')
+A(2,:)=[3 6 10 15 24 42 75 90 79 55 36 26 19 13 9 7]
+disp('third row denotes f*x')
+for i=1:16
+ A(3,i)=A(1,i)*A(2,i);
+end
+disp('fourth row denotes u=(x-25)/2')
+for i=1:16
+ A(4,i)=(A(1,i)-25)/2
+end
+disp('fifth row denotes f*x')
+for i=1:16
+ A(5,i)=A(4,i)*A(2,i);
+end
+A
+b=0;
+disp('sum of all elements of third row=')
+for i=1:16
+ b=A(3,i)
+end
+disp(b)
+f=0;
+disp('sum of all elements of second row=')
+for i=1:16
+ f=f+A(2,i)
+end
+disp(f)
+disp('mean=')
+b/f
+d=0;
+disp('sum of all elements of fifth row=')
+for i=1:16
+ d=d+A(5,i)
+end
+disp('mean by step deviation method=')
25+(2*d/f) \ No newline at end of file
diff --git a/149/CH23/EX23.8/ex8.sce b/149/CH23/EX23.8/ex8.sce
index 201157e53..219a662d9 100755
--- a/149/CH23/EX23.8/ex8.sce
+++ b/149/CH23/EX23.8/ex8.sce
@@ -1,45 +1,45 @@
-clc
-disp('the first row of A represents the mid values of wage classes having interval of 8 in each class=x')
-A(1,:)=[8.5 16.5 24.5 32.5 40.5 48.5 56.5 64.5 72.5]
-disp('the second row denotes the no. of men or in other words frequency=f')
-A(2,:)=[2 24 21 18 5 3 5 8 2]
-disp('third row denotes f*x')
-for i=1:9
- A(3,i)=A(1,i)*A(2,i);
-end
-disp('fourth row denotes d=(x-32.5)/8')
-for i=1:9
- A(4,i)=(A(1,i)-32.5)/8
-end
-disp('fifth row denotes f*d')
-for i=1:9
- A(5,i)=A(4,i)*A(2,i);
-end
-disp('sixth row denotes f*(d^2) ')
-for i=1:9
- A(6,i)=A(4,i)^2*A(2,i);
-end
-A
-b=0;
-disp('sum of all elements of sixth row=')
-for i=1:9
- b+=A(6,i)
-end
-disp(b)
-f=0;
-disp('sum of all elements of second row=')
-for i=1:9
- f+=A(2,i)
-end
-disp(f)
-disp('mean=')
-b/f
-d=0;
-disp('sum of all elements of fifth row=')
-for i=1:9
- d+=A(5,i)
-end
-disp('mean wage=')
-32.5+(8*d/f)
-disp('standard deviation=')
+clc
+disp('the first row of A represents the mid values of wage classes having interval of 8 in each class=x')
+A(1,:)=[8.5 16.5 24.5 32.5 40.5 48.5 56.5 64.5 72.5]
+disp('the second row denotes the no. of men or in other words frequency=f')
+A(2,:)=[2 24 21 18 5 3 5 8 2]
+disp('third row denotes f*x')
+for i=1:9
+ A(3,i)=A(1,i)*A(2,i);
+end
+disp('fourth row denotes d=(x-32.5)/8')
+for i=1:9
+ A(4,i)=(A(1,i)-32.5)/8
+end
+disp('fifth row denotes f*d')
+for i=1:9
+ A(5,i)=A(4,i)*A(2,i);
+end
+disp('sixth row denotes f*(d^2) ')
+for i=1:9
+ A(6,i)=A(4,i)^2*A(2,i);
+end
+A
+b=0;
+disp('sum of all elements of sixth row=')
+for i=1:9
+ b=b+A(6,i)
+end
+disp(b)
+f=0;
+disp('sum of all elements of second row=')
+for i=1:9
+ f=f+A(2,i)
+end
+disp(f)
+disp('mean=')
+b/f
+d=0;
+disp('sum of all elements of fifth row=')
+for i=1:9
+ d=d+A(5,i)
+end
+disp('mean wage=')
+32.5+(8*d/f)
+disp('standard deviation=')
8*(b/f-(d/f)^2) \ No newline at end of file
diff --git a/149/CH34/EX34.34/example34.sce b/149/CH34/EX34.34/example34.sce
index e0b378c74..1bffac088 100755
--- a/149/CH34/EX34.34/example34.sce
+++ b/149/CH34/EX34.34/example34.sce
@@ -1,10 +1,10 @@
-clc
-A=[-3 6 9;1/6 1/2 1/3]
-disp('first row of A displays the value of x')
-disp('the second row of x displays the probability of corresponding to x')
-disp('E(x)=')
-c=A(1,1)*A(2,1)+A(1,2)*(2,2)+A(1,3)*A(2,3)
-disp('E(x)^2=')
-b=A(1,1)^2*A(2,1)+A(1,2)^2*(2,2)+A(1,3)^2*A(2,3)
-disp('E(2*x+1)^2=E(4*x^2+4*x+1)'
+clc
+A=[-3 6 9;1/6 1/2 1/3]
+disp('first row of A displays the value of x')
+disp('the second row of x displays the probability of corresponding to x')
+disp('E(x)=')
+c=A(1,1)*A(2,1)+A(1,2)*A(2,2)+A(1,3)*A(2,3)
+disp('E(x)^2=')
+b=A(1,1)^2*A(2,1)+A(1,2)^2*A(2,2)+A(1,3)^2*A(2,3)
+disp('E(2*x+1)^2=E(4*x^2+4*x+1)')
4*b+4*c+1 \ No newline at end of file