summaryrefslogtreecommitdiff
path: root/243/CH15/EX15.5/15_05.sce
diff options
context:
space:
mode:
Diffstat (limited to '243/CH15/EX15.5/15_05.sce')
-rwxr-xr-x243/CH15/EX15.5/15_05.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/243/CH15/EX15.5/15_05.sce b/243/CH15/EX15.5/15_05.sce
new file mode 100755
index 000000000..a3d627066
--- /dev/null
+++ b/243/CH15/EX15.5/15_05.sce
@@ -0,0 +1,19 @@
+//Example No. 15_05
+//Initial Value Problems
+//Pg No. 494
+clear ; close ; clc ;
+
+h = 1 ;
+k = 2 ;
+tau = h^2/(2*k)
+for i = 2:4
+ f(1,i) = 50*( 4 - (i-1) )
+end
+f(1:7,1) = 0 ;
+f(1:7,5) = 0 ;
+for j = 1:6
+ for i = 2:4
+ f(j+1,i) = ( f(j,i-1) + f(j,i+1) )/2
+ end
+end
+disp(f,'The final results are ') \ No newline at end of file