Professional Documents
Culture Documents
Drivecontrol 1
Drivecontrol 1
Drivecontrol 1
theta2=60;
omega1=0;
omega2=0;
tf=0:0.01:1;
a0=0;
a1=0;
a2=3.*(theta2-theta1)\tf.^2;
a3=-2.*(theta2-theta1)\tf.^2;
dis=a0+a1.*tf+a2.*tf.^2+a3.*tf.^3;
Vel=a1+2.*tf.*a2+3.*a3.*tf.^2;
acc=2.*a2+6.*a3.*tf
jerk=2+6.*a3;
figure(1);
plot(tf,dis);
title('displacement vs time');
xlabel('tf');
ylabel('dis');
grid on;
figure(2);
plot(tf,Vel);
title('velocity vs time');
xlabel('tf');
ylabel('vel');
grid on;
figure(3);
plot(tf,acc);
title('acceleration vs time');
xlabel('tf');
ylabel('acc');
grid on;
figure(4);
plot(tf,jerk);
title('jerk vs time');
xlabel('tf');
ylabel('jerk');
grid on;
acc =
Columns 1 through 7
Columns 8 through 14
Columns 15 through 21
1
Columns 22 through 28
Columns 29 through 35
Columns 36 through 42
Columns 43 through 49
Columns 50 through 56
Columns 57 through 63
Columns 64 through 70
Columns 71 through 77
Columns 78 through 84
Columns 85 through 91
Columns 92 through 98
2
3
4
Published with MATLAB® R2021a