summaryrefslogtreecommitdiff
path: root/243/CH15/EX15.4/15_04.sce
diff options
context:
space:
mode:
Diffstat (limited to '243/CH15/EX15.4/15_04.sce')
-rwxr-xr-x243/CH15/EX15.4/15_04.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/243/CH15/EX15.4/15_04.sce b/243/CH15/EX15.4/15_04.sce
new file mode 100755
index 000000000..449453485
--- /dev/null
+++ b/243/CH15/EX15.4/15_04.sce
@@ -0,0 +1,14 @@
+//Example No. 15_04
+//Gauss-Seidel Iteration
+//Pg No. 491
+clear ; close ; clc ;
+
+f2 = 0
+f3 = 0
+for i = 1:4
+ f1 = (f2 + f3 - 8)/4
+ f4 = f1
+ f2 = (f1 + f4 -32)/4
+ f3 = (f1 + f4 - 2)/4
+ mprintf('\nIteration %i\n f1 = %f, f2 = %f, f3 = %f, f4 = %f\n',i,f1,f2,f3,f4)
+end \ No newline at end of file