blob: c7243aeecd8b954df6487d392e8bbda95d1c2699 (
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
|
clc;
//At equillibrium +sum(Mo)=0,
//s=r*theta;
//F=k*s=k*r*theta;
k=45;//N/mm
r=75;//mm
W=1800;//N
l=200;//mm
//+sum(Mo)=0 W*l*sin(theta)-r(k*r*theta)=0,
//sin(theta)=k*r^2*theta/(W*l)
// trial and error
printf("Probable answers by trial and error method are \n");
for i=0:0.1:%pi/2 // from 0 to 90 degrees
difference=(sin(i)-k*r^2*(i)/(W*l));
if difference<0.01 then // Approximation
theta=i;
theta=theta*180/%pi;//Degrees , conversion into degrees
printf("Theta=%.2f degrees\n",theta);
end
end
|