diff options
Diffstat (limited to '260/CH15/EX15.5/15_5.sce')
-rw-r--r-- | 260/CH15/EX15.5/15_5.sce | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/260/CH15/EX15.5/15_5.sce b/260/CH15/EX15.5/15_5.sce new file mode 100644 index 000000000..f61ac0617 --- /dev/null +++ b/260/CH15/EX15.5/15_5.sce @@ -0,0 +1,24 @@ +//Eg-15.5
+//pg-619
+
+clear
+clc
+close()
+
+y = zeros(5,5);
+
+y(1:5,1) = 10;
+y(1:5,5) = 10;
+y(1,5:4) = 0;
+//y(1,2:4) = 10;
+
+for(i = 3:5)
+ for(j = 2:4)
+ y(i,j) = y(i-1,j+1) + y(i-1,j-1) - y(i-2,j);
+ end
+end
+
+printf('The table of the y values with different rows as different timelines :\n')
+
+Y = y(2:5,:)
+disp(Y)
\ No newline at end of file |