diff options
Diffstat (limited to '413/CH8/EX8.5/Example_8_5.sce')
-rw-r--r-- | 413/CH8/EX8.5/Example_8_5.sce | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/413/CH8/EX8.5/Example_8_5.sce b/413/CH8/EX8.5/Example_8_5.sce new file mode 100644 index 000000000..168ae735c --- /dev/null +++ b/413/CH8/EX8.5/Example_8_5.sce @@ -0,0 +1,46 @@ +clc
+clear
+for i=1:35
+ for j=1:35
+ A(i,j)=0
+ end
+end
+
+
+for i=1:34
+ A(i,i+1)=1
+end
+
+for i=2:35
+ A(i,i-1)=1
+end
+
+for i=6:5:30
+ A(i,i-1)=0
+end
+
+for i=1:30
+ A(i,i+5)=1
+end
+for i=1:30
+ A(i+5,i)=1
+end
+
+for i=5:5:30
+ A(i,i+1)=0
+end
+
+for i=1:35
+ A(i,i)=-4
+end
+disp(A)
+for i=1:35
+ B(i,1)=-2
+end
+
+X=A\B
+
+for i=1:5:35
+T=[ X(i,1), X(i+1,1),X(i+2, 1), X(i+3,1), X(i+4,1)]
+disp(T)
+end
\ No newline at end of file |