summaryrefslogtreecommitdiff
path: root/260/CH14/EX14.7
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /260/CH14/EX14.7
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '260/CH14/EX14.7')
-rw-r--r--260/CH14/EX14.7/14_7.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/260/CH14/EX14.7/14_7.sce b/260/CH14/EX14.7/14_7.sce
new file mode 100644
index 000000000..49fa8d299
--- /dev/null
+++ b/260/CH14/EX14.7/14_7.sce
@@ -0,0 +1,23 @@
+//Eg-14.7
+//pg-593
+
+clear
+clc
+close()
+
+x = [0 0.2 0.8 1];
+
+//Using the boundary conditions and the equations at the internal points we have 4 equations and 4 unknowns
+
+A = [-7.0004 8.1966 -2.1964 1.0001;-0.9996 2.1955 -8.1957 6.9999;13.6609 -24.2685 13.7324 -5.1247;-3.6594 10.2665 -27.7312 19.1244];
+
+B = [0;1;0;0];
+
+X = inv(A)*B;
+
+printf('y0 = %f y1 = %f\n y2 = %f y3 = %f\n',X(1),X(2),X(3),X(4))
+
+plot(x,X,'ks')
+legend('Two point OC')
+xlabel('x')
+ylabel('y') \ No newline at end of file