From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 149/CH23/EX23.13/ex13.sce | 71 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 149/CH23/EX23.13/ex13.sce (limited to '149/CH23/EX23.13/ex13.sce') diff --git a/149/CH23/EX23.13/ex13.sce b/149/CH23/EX23.13/ex13.sce new file mode 100755 index 000000000..ccac5eab7 --- /dev/null +++ b/149/CH23/EX23.13/ex13.sce @@ -0,0 +1,71 @@ +clear +clc +disp('the first row of A denotes the corresponding I.R. of students ') +A(1,:)=[105 104 102 101 100 99 98 96 93 92]; +disp('the second row denotes the corresponding deviation of I.R.') +for i=1:10 + A(2,i)=A(1,i)-99; +end +disp('the third row denotes the square of corresponding deviation of I.R. ') +for i=1:10 + A(3,i)=A(2,i)^2; +end +disp('the fourth row denotes the corresponding E.R. of students ') + A(4,:)=[101 103 100 98 95 96 104 92 97 94]; +disp('the fifth row denotes the corresponding deviation of E.R. ') +for i=1:10 + A(5,i)=A(4,i)-98; +end +disp('the sixth row denotes the square of corresponding deviation of E.R. ') +for i=1:10 + A(6,i)=A(5,i)^2; +end +disp('the seventh row denotes the product of the two corresponding deviations ') +for i=1:10 + A(7,i)=A(2,i)*A(5,i); +end +A +a=0; +disp('the sum of elements of first row=a') +for i=1:10 + a=a+A(1,i); +end +a +b=0; +disp('the sum of elements of second row=b') +for i=1:10 + b=b+A(2,i); +end +b +c=0; +disp('the sum of elements of third row=c') +for i=1:10 + c=c+A(3,i); +end +c +d=0; +disp('the sum of elements of fourth row=d') +for i=1:10 + d=d+A(4,i); +end +d +e=0; +disp('the sum of elements of fifth row=e') +for i=1:10 + e=e+A(5,i); +end +e +f=0; +disp('the sum of elements of sixth row=d') +for i=1:10 + f=f+A(6,i); +end +f +g=0; +disp('the sum of elements of seventh row=d') +for i=1:10 + g=g+A(7,i); +end +g +disp('coefficient of correlation=') +g/(c*f)^0.5 \ No newline at end of file -- cgit