diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /75/CH8/EX8.2 | |
download | Scilab-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.2')
-rwxr-xr-x | 75/CH8/EX8.2/ex_2.sce | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/75/CH8/EX8.2/ex_2.sce b/75/CH8/EX8.2/ex_2.sce new file mode 100755 index 000000000..60c4aca7f --- /dev/null +++ b/75/CH8/EX8.2/ex_2.sce @@ -0,0 +1,16 @@ + // EXAMPLE (PG 512) + +A = [1 2 1;2 2 3;-1 -3 0] // Coefficient matrix +b = [0 3 2]' // Right hand matrix +[l,u] = lu(A) + // l is lower triangular matrix & u is upper triangular matrix +l*u +if(A==l*u) + disp('A = LU is verified') +end +det(A) +det(u) +if(det(A)==det(u)) + disp('Determinant of A is equal to that of its upper triangular matrix') + + // Product rule of determinants is verified |