You are on page 1of 4

L=10 %cm

L = 10

r=2 %cm

r = 2

syms teta
rot=[cos(teta) -sin(teta) 0;
sin(teta) cos(teta) 0;
0 0 1]

rot =

A=[1 0 -L;
0 1 -L;
1 0 L;
0 1 L]

A = 4×3
1 0 -10
0 1 -10
1 0 10
0 1 10

vx1=100 %cm/s

vx1 = 100

vy1=100 %cm/s

vy1 = 100

vx2=100 %cm/s

vx2 = 100

vy2=-200 %cm/s

vy2 = -200

vx3=200/3 %cm/s

vx3 = 66.6667

vy3=100 %cm/s

vy3 = 100

w=2*pi/3 %rad/s

w = 2.0944

1
E1=[vx1; vy1; w]

E1 = 3×1
100.0000
100.0000
2.0944

E2=[vx2; vy2; w]

E2 = 3×1
100.0000
-200.0000
2.0944

E3=[vx3; vy3; w]

E3 = 3×1
66.6667
100.0000
2.0944

j=1

j = 1

for t=0:0.1:9
teta=t.*w;
rota=eval(rot);
ER(1:4,j)=(0<=t)*(t<3)*A*inv(rota)*E1+(3<=t)*(t<6)*A*inv(rota)*E2+(6<=t)*(t<=9)*A*inv(rota)
j=j+1;
end
t=0:0.1:9

t = 1×91
0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000

plot(t,ER(1,1:91))

2
plot(t,ER(2,1:91))

3
plot(t,ER(3,1:91))

You might also like