summaryrefslogtreecommitdiff
path: root/3886/CH10/EX10.5/10_5.sce
blob: 443b4c89808ba0882fe5ff948aa4a4dccad2c0c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//Locate centroid
//Refer fig.10.6
//lets assign random value to w
w=1
sumWi=1053.98*w
sumWixi=95055.54*w
sumWiyi=125214.83*w
sumWizi=59201.4*w
xbar=(sumWixi)/(sumWi)
ybar=(sumWiyi)/(sumWi)
zbar=(sumWizi)/(sumWi)
printf("\nxbar=%.2f mm\nybar=%.2f mm\nzbar=%.2f mm",xbar,ybar,zbar)