summaryrefslogtreecommitdiff
path: root/3782/CH7/EX7.4/Ex7_4.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3782/CH7/EX7.4/Ex7_4.sce
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 '3782/CH7/EX7.4/Ex7_4.sce')
-rw-r--r--3782/CH7/EX7.4/Ex7_4.sce31
1 files changed, 31 insertions, 0 deletions
diff --git a/3782/CH7/EX7.4/Ex7_4.sce b/3782/CH7/EX7.4/Ex7_4.sce
new file mode 100644
index 000000000..9a4e8782b
--- /dev/null
+++ b/3782/CH7/EX7.4/Ex7_4.sce
@@ -0,0 +1,31 @@
+
+
+
+//ch-7 page 216 pb-2
+//
+
+//given
+
+printf("\n trapezoidal rule')
+//given offsets
+o1=3.5,o2=4.3,o3=6.75,o4=5.25,o5=7.5,o6=8.8,o7=7.9,
+
+o8=6.4,o9=4.4,o10=3.25,
+
+//distances
+dis=15
+
+area1=(dis/2)*(o1+o10+(2*(o2+o3+o4+o5+o6+o7+o8+o9)))
+
+printf("\n required area is %0.3f square meters',area1)
+
+printf("\n simpsons rule')
+
+A1=dis/3*(o1+o9+4*(o2+o4+o6+o8)+2*(o3+o5+o7))
+
+A2=dis/2*(o10+o9)
+
+area2=A1+A2
+printf("\n%0.3f %0.3f ", A1,A2)
+
+printf("\n required area is %0.3f square meters',area2)