summaryrefslogtreecommitdiff
path: root/3588/CH6/EX6.3
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3588/CH6/EX6.3
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 '3588/CH6/EX6.3')
-rw-r--r--3588/CH6/EX6.3/EX6_3.savbin0 -> 28248 bytes
-rw-r--r--3588/CH6/EX6.3/EX6_3.sce32
2 files changed, 32 insertions, 0 deletions
diff --git a/3588/CH6/EX6.3/EX6_3.sav b/3588/CH6/EX6.3/EX6_3.sav
new file mode 100644
index 000000000..8469ef271
--- /dev/null
+++ b/3588/CH6/EX6.3/EX6_3.sav
Binary files differ
diff --git a/3588/CH6/EX6.3/EX6_3.sce b/3588/CH6/EX6.3/EX6_3.sce
new file mode 100644
index 000000000..2c5f799b1
--- /dev/null
+++ b/3588/CH6/EX6.3/EX6_3.sce
@@ -0,0 +1,32 @@
+//Clearing console
+clc
+clear
+
+x = poly(0,"x")
+y = poly(0,"y")
+
+//Intializing Variables
+r = 1
+s = 0.5
+
+//Node 2: (3*m + b=1)
+//Node 3: (2.5*m + b=2)
+//constructing matrices for solving b and m
+k = [3 1;2.5 1]
+f = [1;2]
+
+//Solving for b and m
+u(1:2,1)=linsolve(k,-f)
+
+//Calculating x and y for (r, s) = (1, 0.5)
+X = (1 - r )*(1 - s)/4 + (1 + r )*(1 - s)*(3)/4 + (1 + r )*(1 + s)*(2.5)/4 + (1 - r )*(1 + s)*(1.25)/4
+Y =(1 - r )*(1 - s)/4 + (1 + r )*(1 - s)/4 + (1 + r )*(1 + s)*(2)/4 + (1 - r )*(1 + s)*(1.75)/4
+
+
+
+//Printing Results
+printf('\nResults\n')
+printf('\nelement edge 2-3 is described by y=')
+disp(u(1,1)*x + u(2,1))
+printf('\nFor (r, s) = (1, 0.5) , we obtain')
+printf('\n x=%f y=%f',X,Y)