summaryrefslogtreecommitdiff
path: root/3782/CH7/EX7.3
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.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 '3782/CH7/EX7.3')
-rw-r--r--3782/CH7/EX7.3/Ex7_3.sce48
1 files changed, 48 insertions, 0 deletions
diff --git a/3782/CH7/EX7.3/Ex7_3.sce b/3782/CH7/EX7.3/Ex7_3.sce
new file mode 100644
index 000000000..d034f8f6b
--- /dev/null
+++ b/3782/CH7/EX7.3/Ex7_3.sce
@@ -0,0 +1,48 @@
+
+
+
+//
+
+//GIVEN
+
+
+dis=10
+a=0,g=0,
+
+b=2.5,c=3.5,d=5,e=4.6,f=3.2,
+
+
+printf("\n Mid ordinate rule')
+//FINDING MID ORDINATES
+h1=(a+b)/2
+h2=(b+c)/2
+h3=(c+d)/2
+h4=(d+e)/2
+h5=(e+f)/2
+h6=(f+g)/2
+//find area
+area=dis*(h1+h2+h3+h4+h5+h6)
+
+printf("\n required area is %0.3f square meters',area)
+
+printf("\n average ordinate rule')
+dis=10//m
+p=6//no of divs
+bl=dis*p//base length
+no=7//no of ordinates
+
+
+area2=bl*(a+b+c+d+e+f+g)/no
+
+printf("\n required area is %0.3f square meters',area2)
+
+printf("\n trapezoidal rule')
+
+
+area3=(dis/2)*(2*(a+b+c+d+e+f+g))
+
+printf("\n required area is %0.3f square meters',area3)
+printf("\n simpsons rule')
+
+area4=(dis/3)*(4*(b+d+f)+2*(c+e))
+printf("\n required area is %0.3f square meters',area4)