Function call
unknown
matlab
3 years ago
1.4 kB
10
Indexable
tic
A = load("torque_for_Sid_60s.mat");
T_a = A.torque_60s(1:6001); %Torque (Nm)
speed = 1000/60;
tspan=0:0.00001:0.06;
%tspan = [0 12];
y0 = zeros(12,1);
[t,y] = ode45(@(t,y) reduced2(t,y,T_a),tspan,y0);
toc
%Driver gear graphs
nexttile
plot(t,y(:,2))
ylabel('(y) up and down accelration (m/s2)')
xlabel('Time')
title('acceleration in y direction of driver gear vs time')
axis padded
grid on
nexttile
plot(t,y(:,4))
ylabel('(z) side to side accelration (m/s2)')
xlabel('Time')
title('acceleration in z direction of driver gear vs time')
axis padded
grid on
nexttile
plot(t,y(:,6))
ylabel('angular accelration (rad/s2)')
xlabel('Time')
title('angular acceleration of driver gear vs time')
axis padded
grid on
% Driven gear graphs
nexttile
plot(t,y(:,8))
ylabel('(y) up and down accelration (m/s2)')
xlabel('Time')
title('acceleration in y direction of driven gear vs time')
axis padded
grid on
nexttile
plot(t,y(:,10))
ylabel('(z) side to side accelration (m/s2)')
xlabel('Time')
title('acceleration in z direction of driven gear vs time')
axis padded
grid on
nexttile
plot(t,y(:,12))
ylabel('angular accelration (rad/s2)')
xlabel('Time')
title('angular acceleration of driven gear vs time')
axis padded
grid on
nexttile
plot(t,T_a(1:6001))
ylabel('Torque (Nm)')
xlabel('Time (sec)')
title('Torque vs time')
axis padded
grid on
Editor is loading...