summaryrefslogtreecommitdiff
path: root/964/CH25/EX25.9
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /964/CH25/EX25.9
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '964/CH25/EX25.9')
-rwxr-xr-x964/CH25/EX25.9/25_9.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/964/CH25/EX25.9/25_9.sce b/964/CH25/EX25.9/25_9.sce
new file mode 100755
index 000000000..ba1c4f88b
--- /dev/null
+++ b/964/CH25/EX25.9/25_9.sce
@@ -0,0 +1,15 @@
+//clc()
+//dy1/dx = -0.5*y1
+//dy2/dx = 4 - 0.3*y2 - 0.1*y1
+x1 = 0;
+h =0.5;
+y1(1) = 4;
+y2(1) = 6;
+x = 0:h:2;
+for i = 2:5
+ y1(i) = y1(i-1) -0.5*y1(i-1)*h;
+ y2(i) = y2(i-1) + (4 - 0.3*y2(i-1) - 0.1*y1(i-1))*h;
+end
+disp(x,"x = ")
+disp(y1,"y1 = ")
+disp(y2,"y2 = ")