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.7/ex7.sce | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 149/CH23/EX23.7/ex7.sce (limited to '149/CH23/EX23.7/ex7.sce') diff --git a/149/CH23/EX23.7/ex7.sce b/149/CH23/EX23.7/ex7.sce new file mode 100755 index 000000000..913fbe245 --- /dev/null +++ b/149/CH23/EX23.7/ex7.sce @@ -0,0 +1,39 @@ +clear +clc +disp('the first row denotes the size of item') +A(1,:)=[6 7 8 9 10 11 12]; +disp('the second row denotes the corresponding frequency (f)') +A(2,:)=[3 6 9 13 8 5 4]; +disp('the third row denotesthe corresponding deviation (d)') +A(3,:)=[-3 -2 -1 0 1 2 3]; +disp('the fourth row denotes the corresponding f*d ') +for i=1:7 + A(4,i)=A(2,i)*A(3,i); +end +disp('the fifth row denotes the corresponding f*d^2') +for i=1:7 + A(5,i)=A(2,i)*(A(3,i)^2); +end +A +b=0; +disp('sum of fourth row elements=') +for i=1:7 + b=b+A(4,i); +end +disp(b) +c=0 +disp('sum of fifth row elements=') +for i=1:7 + c=c+A(5,i); +end +disp(c) +d=0; +disp('sum of all frequencies=') +for i=1:7 + d=d+A(2,i); +end +disp(d) +disp('mean=9+b/d=') +9+b/d +disp('standard deviation=(c/d)^0.5') +(c/d)^0.5 \ No newline at end of file -- cgit