s = tf('s');

G21 = (0.2375*s - 0.059375)/(s*(s+9.75));
half_rule_G21 = -(0.059375/9.75)*exp(-(69/17)*s)/s;
G22 = (0.059375)/(s*(s+9.75));
half_rule_G22 = (0.059375/9.75)*exp(-(2/34)*s)/s;

figure(1)
step(G21,half_rule_G21)
hold on;
axis([-1 50 -0.3 0.06])
set(xlabel("Time"))
legend('Linearized','Half-rule','Location','northeast')
hold off;
print('-depsc2','-r600','Part2_HalfRule_G21.eps') % save figure as eps

figure(2)
step(G22,half_rule_G22)
axis([0 5 -0.01 0.03])
xlabel("Time")
legend('Linearized','Half-rule','Location','northeast')
print('-depsc2','-r600','Part2_HalfRule_G22.eps') % save figure as eps