summaryrefslogtreecommitdiff
path: root/1332/CH6/EX6.5
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1332/CH6/EX6.5
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1332/CH6/EX6.5')
-rwxr-xr-x1332/CH6/EX6.5/6_5.pdfbin0 -> 6110 bytes
-rwxr-xr-x1332/CH6/EX6.5/6_5.sce48
2 files changed, 48 insertions, 0 deletions
diff --git a/1332/CH6/EX6.5/6_5.pdf b/1332/CH6/EX6.5/6_5.pdf
new file mode 100755
index 000000000..571664a3b
--- /dev/null
+++ b/1332/CH6/EX6.5/6_5.pdf
Binary files differ
diff --git a/1332/CH6/EX6.5/6_5.sce b/1332/CH6/EX6.5/6_5.sce
new file mode 100755
index 000000000..c8db77c99
--- /dev/null
+++ b/1332/CH6/EX6.5/6_5.sce
@@ -0,0 +1,48 @@
+//Example 6.5
+//Dolittle Factorization Method
+//Page no. 233
+clc;clear;close;
+
+A=[2,1,1;1,3,1;1,1,4];
+printf('\tL\t\t *\t\tU\t\t =\t\tA')
+U(2,1)=0;U(3,1)=0;U(3,2)=0;
+L(1,2)=0;L(1,3)=0;L(2,3)=0;
+for i=1:3
+ L(i,i)=1
+end
+for i=1:3
+ U(1,i)=A(1,i)
+end
+L(2,1)=1/U(1,1);
+for i=2:3
+ U(2,i)=A(2,i)-U(1,i)*L(2,1);
+end
+L(3,1)=1/U(1,1);
+L(3,2)=(A(3,2)-U(1,2)*L(3,1))/U(2,2);
+U(3,3)=A(3,3)-U(1,3)*L(3,1)-U(2,3)*L(3,2);
+printf('\n')
+for i=1:3
+ for j=1:3
+ printf('%.2f\t',L(i,j))
+ end
+
+ if(i==2)
+ printf(' * ')
+ else
+ printf('\t')
+ end
+
+ for j=1:3
+ printf('%.2f\t',U(i,j))
+ end
+ if(i==2)
+ printf(' = ')
+ else
+ printf('\t')
+ end
+ for j=1:3
+ printf('%.2f\t',A(i,j))
+ end
+ printf('\n')
+end
+