summaryrefslogtreecommitdiff
path: root/75/CH8/EX8.4
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /75/CH8/EX8.4
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 '75/CH8/EX8.4')
-rwxr-xr-x75/CH8/EX8.4/ex_4.sce22
1 files changed, 22 insertions, 0 deletions
diff --git a/75/CH8/EX8.4/ex_4.sce b/75/CH8/EX8.4/ex_4.sce
new file mode 100755
index 000000000..baf897796
--- /dev/null
+++ b/75/CH8/EX8.4/ex_4.sce
@@ -0,0 +1,22 @@
+ // EXAMPLE (PG 518)
+
+ // Row interchanges on A can be represented by premultiplication of A
+ // by an appropriate matrix E, to get EA.
+ // Then, Gaussian Elimination leads to LU = PA
+
+A = [0.729 0.81 0.9;1 1 1;1.331 1.21 1.1] // Coefficient Matrix
+b = [0.6867 0.8338 1.000]' // Right Hand Matrix
+[L,U,E] = lu(A)
+ // L is lower triangular matrix(mxn)
+ // U is upper triangular matrix(mxmin(m,n))
+ // E is permutation matrix(min(m,n)xn)
+Z=L*U
+
+disp("LU = EA")
+E
+
+ // The result EA is the matrix A with first,rows 1 & 3 interchanged,
+ // and then rows 2 & 3 interchanged.
+
+ // NOTE:-According to the book, P is replaced by E here.
+