summaryrefslogtreecommitdiff
path: root/413/CH6/EX6.5
diff options
context:
space:
mode:
Diffstat (limited to '413/CH6/EX6.5')
-rw-r--r--413/CH6/EX6.5/Table_6_4.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/413/CH6/EX6.5/Table_6_4.sce b/413/CH6/EX6.5/Table_6_4.sce
new file mode 100644
index 000000000..50ef64a56
--- /dev/null
+++ b/413/CH6/EX6.5/Table_6_4.sce
@@ -0,0 +1,17 @@
+clc
+clear
+x=[0 0.1 0.2 0.3 0.4 0.5 0.6]
+h=0.1
+y(1,1)=-1
+for i=1:6
+ k1(1,i)=h*(-2*x(1,i)-y(1,i))
+ k2(1,i)=h*(-2*(x(1,i)+h/2)-(y(1,i)+k1(1,i)/2))
+ k3(1,i)=h*(-2*(x(1,i)+h/2)-(y(1,i)+k2(1,i)/2))
+ k4(1,i)=h*(-2*(x(1,i)+h)-(y(1,i)+k3(1,i)))
+ kA(1,i)=(k1(1,i)+2*k2(1,i)+2*k3(1,i)+k4(1,i))/6
+ y(1,i+1)=y(1,i)+kA(1,i)
+end
+for i=1:6
+T=[x(1,i), y(1,i), k1(1,i),k2(1,i),k3(1,i),k4(1,i),kA(1,i)]
+disp(T)
+end \ No newline at end of file