summaryrefslogtreecommitdiff
path: root/3772/CH1/EX1.6
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3772/CH1/EX1.6
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 '3772/CH1/EX1.6')
-rw-r--r--3772/CH1/EX1.6/Ex1_6.sce30
1 files changed, 30 insertions, 0 deletions
diff --git a/3772/CH1/EX1.6/Ex1_6.sce b/3772/CH1/EX1.6/Ex1_6.sce
new file mode 100644
index 000000000..eb447d1cd
--- /dev/null
+++ b/3772/CH1/EX1.6/Ex1_6.sce
@@ -0,0 +1,30 @@
+// Problem 1.6,Page no.12
+
+
+clc;clear;close;
+
+//Rectangle-1
+a_1=51200 //mm**2
+x_1=160 //mm
+y_1=80 //mm
+
+//Triangle-2
+a_2=6400 //mm**2
+x_2=80*3**-1 //mm
+y_2=320*3**-1 //mm
+
+//Semicircle-3
+a_3=1250*%pi //mm**2
+x_3=210 //mm
+y_3=(160-(4*50-(3*%pi)**-1)) //mm
+
+
+//Calculation
+
+X_bar=(a_1*x_1-a_2*x_2-a_3*x_3)*(a_1-a_2-a_3)**-1 //mm
+Y_bar=(a_1*y_1-a_2*y_2-a_3*y_3)*(a_1-a_2-a_3)**-1 //mm
+
+//Result
+printf("The centroid of the given area is %.2f mm",X_bar)
+printf("\n The centroid of the given area is %.2f mm",Y_bar)
+//Answer given in the textbook is wrong.