summaryrefslogtreecommitdiff
path: root/26/CH2/EX2.5.7/2_5_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '26/CH2/EX2.5.7/2_5_7.sce')
-rwxr-xr-x26/CH2/EX2.5.7/2_5_7.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/26/CH2/EX2.5.7/2_5_7.sce b/26/CH2/EX2.5.7/2_5_7.sce
new file mode 100755
index 000000000..22c2cd9ee
--- /dev/null
+++ b/26/CH2/EX2.5.7/2_5_7.sce
@@ -0,0 +1,14 @@
+disp('given matrix is:')
+a=[2 5;-3 -4]
+d=a;
+disp(a)
+disp('performing row operations')
+a(2,:)=a(2,:)-(a(2,1)/a(1,1))*a(1,:)
+disp(a)
+disp(a)
+disp('thus, the upper triangular matrix is')
+U=a;
+disp(U,'U=')
+disp('the lower triangular matrix is:')
+L=[1 0;d(2,1)/d(1,1) 1];
+disp(L,'L=') \ No newline at end of file