summaryrefslogtreecommitdiff
path: root/3772/CH1/EX1.1/Ex1_1.sce
blob: 523a16618f28da04f4920f23fb4833dc9b3c839f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Problem 1.1,Page No.8


clc;clear;
close;

//Rectangle-1
a_1=37.5 //cm**2    
y_1=26.25 //cm      

//Rectangle-2
a_2=50   //cm**2   
y_2=15   //cm      

//Rectangle-3
a_3=150  //cm**2    
y_3=2.5  //cm      


//Calculation


Y_bar=(a_1*y_1+a_2*y_2+a_3*y_3)*(a_1+a_2+a_3)**-1 //cm  

//Result
printf("The centroid of the section is %.2f cm",Y_bar)