Sunteți pe pagina 1din 12

l1=input('introduceti l1=');

l2=input('introduceti l2=');
l3=input('introduceti l3=');
l4=input('introduceti l4=');
l6=input('introduceti l6=');
l0x=input('introduceti l0x=');
l0y=input('introduceti l0y=');
ldx=input('introduceti ldx=');
ldy=input('introduceti ldy=');
omega1=input('Introduceti omega1=');
alfa=input('Introduceti alfa=');
p=input('introduceti pasul p=');
fi1=0:p:2*pi;
a2=2.*l2.*(l0y+l1.*sin(fi1));
b2=2*l2*(l1.*cos(fi1)-l0x);
c2=l0x*l0x+l0y*l0y+l1*l1+l2*l2-l3*l3+2*l1*(l0y.*sin(fi1)-l0x.*cos(fi1));
d2=(a2-sqrt(a2.*a2+b2.*b2-c2.*c2))./(b2-c2);
fi2=2*atan(d2);
a3=-2*l3*(l0y+l1.*sin(fi1));
b3=-2*l3*(l1.*cos(fi1)-l0x);
c3=l0x*l0x+l0y*l0y+l1*l1-l2*l2+l3*l3+2*l1*(l0y.*sin(fi1)-l0x.*cos(fi1));
d3=(a3-sqrt(a3.*a3+b3.*b3-c3.*c3))./(b3-c3);
fi3=2*atan(d3);
%if fi3<0,
%fi3=pi+fi3;
omega2=omega1.*l1.*sin(fi1-fi3)./(l2.*sin(fi3-fi2));
omega3=omega1.*l1.*sin(fi1-fi2)./(l2.*sin(fi3-fi2));
epsilon2=(l1.*omega1.*omega1.*cos(fi1-fi3)+l2.*omega2.*omega2.*cos(fi3-fi2)-...
l3.*omega3.*omega3)./(l2.*sin(fi3-fi2));
epsilon3=(l1.*omega1.*omega1.*cos(fi1-fi3)-l3.*omega3.*omega3.*cos(fi3-fi2)+...
l2.*omega2.*omega2)./(l3.*sin(fi3-fi2));
a4=-ldy+l1.*sin(fi1)+l4.*sin(alfa+fi2);
b4=-ldx+l1.*cos(fi1)+l4.*cos(alfa+fi2);
c4=-l6;
d4=(a4+sqrt(a4.*a4+b4.*b4-c4.*c4))./(b4-c4);
fi6=2*atan(d4);
%if fi6<0,
%fi6=pi+fi6;
s5=(ldy-l1.*sin(fi1)-l4.*sin(alfa+fi2)+l6.*sin(fi6))./cos(fi6);
omega6=(omega1.*l1.*sin(fi6-fi1)+omega2.*l4.*sin(fi6-fi2-alfa))./s5;
v5=(-omega1.*l1.*sin(fi1)omega6.*l6.*sin(fi6)+omega6.*s5.*cos(fi6)+omega2.*l4.*sin(fi2+alfa))./sin(fi6);
epsilon6=(-omega1.*omega1.*l1.*cos(fi6-fi1)-omega2.*omega2.*l4.*cos(fi6-fi2alfa)+omega1.*omega6.*l1.*cos(fi6-fi1)+omega2.*omega6.*l4.*cos(fi6-fi2-alfa)omega6.*v5)./s5;
a5=(-omega1.*omega1.*l1.*cos(fi1)+omega2.*omega2.*l4.*cos(fi2+alfa)omega6.*omega6.*l6.*cos(fi6)omega6.*omega6.*s5.*sin(fi6)+omega6.*v5.*cos(fi6))./(omega6.*cos(fi6));
disp(' fi1 fi2 fi3' )
[fi1',fi2',fi3']
pause;
plot(fi1,fi2,fi1,fi3)
pause;

disp(' fi1 omega2 omega3' )


[fi1',omega2',omega3']
plot(fi1,omega2,fi1,omega3)
pause;
disp(' fi1 epsilon2 epsilon3')
[fi1',epsilon2',epsilon3']
pause;
plot(fi1,epsilon2,fi1,epsilon3)
pause;
disp(' fi1 fi6' )
[fi1',fi6']
pause;
plot(fi1,fi6)
pause;
disp(' fi1 s5' )
[fi1',s5']
pause;
plot(fi1,s5)
pause;
disp(' fi1 omega6' )
[fi1',omega6']
plot(fi1,omega6)
pause;
disp(' fi1 v5' )
[fi1',v5']
plot(fi1,v5)
pause;
disp(' fi1 epsilon6' )
[fi1',epsilon6']
plot(fi1,epsilon6)
pause;
disp(' fi1 a5' )
[fi1',a5']
plot(fi1,a5)
pause;

fi1 fi2 fi3


ans =
0.0000e+000
523.5988e-003
1.0472e+000
1.5708e+000
2.0944e+000
2.6180e+000
3.1416e+000
3.6652e+000
4.1888e+000

1.8616e+000
1.5944e+000
1.3005e+000
1.1128e+000
1.0288e+000
1.0262e+000
1.0946e+000
1.2282e+000
1.4131e+000

-1.7339e+000
-2.0031e+000
-2.2152e+000
-2.3182e+000
-2.3419e+000
-2.3070e+000
-2.2204e+000
-2.0866e+000
-1.9192e+000

4.7124e+000
5.2360e+000
5.7596e+000
6.2832e+000

1.6226e+000
1.8152e+000
1.9264e+000
1.8616e+000

-1.7464e+000
-1.6132e+000
-1.5861e+000
-1.7339e+000

fi1 omega2 omega3


ans =
0.0000e+000 115.2318e+000
523.5988e-003 67.1040e+000
1.0472e+000 -16.8898e+000
1.5708e+000 -121.9952e+000
2.0944e+000 -217.0004e+000
2.6180e+000 -262.8590e+000
3.1416e+000 -236.3064e+000
3.6652e+000 -150.6489e+000
4.1888e+000 -47.1117e+000
4.7124e+000 39.6894e+000
5.2360e+000 97.0745e+000
5.7596e+000 123.4340e+000

-111.8780e+000
-102.0820e+000
-35.1173e+000
79.3607e+000
197.3703e+000
268.8571e+000
263.7384e+000
192.5457e+000
96.6858e+000
11.7568e+000
-49.8828e+000
-90.1172e+000

6.2832e+000 115.2318e+000 -111.8780e+000

fi1 epsilon2 epsilon3


ans =
0.0000e+000 -63.4105e+003
523.5988e-003 -49.5081e+003
1.0472e+000 -22.7982e+003
1.5708e+000 -93.1905e+003
2.0944e+000 -412.7200e+003
2.6180e+000 -797.3798e+003
3.1416e+000 -771.7220e+003
3.6652e+000 -350.7882e+003
4.1888e+000 -35.2038e+003
4.7124e+000 21.5455e+003
5.2360e+000 -22.4807e+003
5.7596e+000 -56.7193e+003
6.2832e+000 -63.4105e+003

49.1866e+003
19.4547e+003
-11.5002e+003
50.8088e+003
335.7988e+003
685.8643e+003
690.5463e+003
351.6506e+003
87.6146e+003
31.1142e+003
53.4293e+003
64.0169e+003
49.1866e+003

fi1 fi6
ans =
0.0000e+000 235.0684e-003
523.5988e-003 210.6869e-003
1.0472e+000 86.0764e-003
1.5708e+000 -150.9474e-003
2.0944e+000 -380.4054e-003
2.6180e+000 -463.1645e-003
3.1416e+000 -423.0158e-003
3.6652e+000 -320.0306e-003
4.1888e+000 -189.7511e-003
4.7124e+000 -52.1121e-003
5.2360e+000 77.7257e-003
5.7596e+000 181.9886e-003
6.2832e+000 235.0684e-003

fi1 s5
ans =
0.0000e+000
523.5988e-003
1.0472e+000
1.5708e+000
2.0944e+000
2.6180e+000
3.1416e+000
3.6652e+000
4.1888e+000
4.7124e+000
5.2360e+000
5.7596e+000
6.2832e+000

245.8306e+000
201.1667e+000
156.3096e+000
129.2143e+000
131.4473e+000
158.6811e+000
196.3158e+000
233.4926e+000
263.6780e+000
282.5287e+000
287.0849e+000
275.3473e+000
245.8306e+000

fi1 omega6
ans =
0.0000e+000
523.5988e-003
1.0472e+000
1.5708e+000
2.0944e+000
2.6180e+000
3.1416e+000
3.6652e+000
4.1888e+000
4.7124e+000
5.2360e+000
5.7596e+000
6.2832e+000

17.3283e+000
-9.2748e+000
-44.7867e+000
-70.5766e+000
-59.4619e+000
-27.9863e+000
-1.5865e+000
15.9963e+000
26.8719e+000
32.8930e+000
34.5390e+000
30.5835e+000
17.3283e+000

fi1 v5
ans =
0.0000e+000 3.3520e+003
523.5988e-003 -34.4832e+003
1.0472e+000 -162.4938e+003
1.5708e+000 119.4634e+003
2.0944e+000 44.0357e+003
2.6180e+000 21.6299e+003
3.1416e+000 1.0376e+003
3.6652e+000 -27.8301e+003
4.1888e+000 -80.0523e+003
4.7124e+000 -326.9902e+003
5.2360e+000 187.2733e+003
5.7596e+000 47.6265e+003
6.2832e+000 3.3520e+003

fi1 epsilon6
ans =
0.0000e+000
523.5988e-003
1.0472e+000
1.5708e+000
2.0944e+000
2.6180e+000
3.1416e+000
3.6652e+000
4.1888e+000
4.7124e+000
5.2360e+000
5.7596e+000
6.2832e+000

-2.4100e+003
-6.1759e+003
-52.0889e+003
69.1409e+003
39.4199e+003
26.6470e+003
15.5312e+003
8.5367e+003
9.7061e+003
37.9503e+003
-23.0596e+003
-6.2752e+003
-2.4100e+003

fi1 a5
ans =
0.0000e+000 -86.6649e+003
523.5988e-003 88.8098e+003
1.0472e+000 -147.0902e+003
1.5708e+000 130.1369e+003
2.0944e+000 67.9487e+003
2.6180e+000 92.8475e+003
3.1416e+000 785.5205e+003
3.6652e+000 -24.0813e+003
4.1888e+000 -62.4289e+003
4.7124e+000 -329.8182e+003
5.2360e+000 160.5154e+003
5.7596e+000 -900.8477e+000
6.2832e+000 -86.6649e+003