System Response Graphs
System Response Graphs
ODE Analysis
Figure 1:
Figure 2:
M Files:
Part 2.1:
% Lab 3 M-File
xzero = 0; xprimezero = 0;
m = 1; k = 1; c = 0.3;
sim('Lab3Part2');
y1 = simout;
t = time;
c = 0.5;
sim('Lab3Part2');
y2 = simout;
c = 0.7;
sim('Lab3Part2');
y3 = simout;
c = 1;
sim('Lab3Part2');
y4 = simout;
%subtitle('Fig 1: Step Responses As Damping Varies');
subplot(3.4, 2, 3);
plot(t, y1, 'r');
title('c = 0.3');
xlabel('Time (s)');
ylabel('Output Variable x(t) (no units)');
legend('Damping c = 0.3');
grid;
subplot(3.4, 2, 4);
plot(t, y2, 'k');
title('c = 0.5');
xlabel('Time (s)');
ylabel('Output Variable x(t) (no units)');
legend('Damping c = 0.5');
grid;
subplot(3,2,5);
plot(t, y3, 'g');
title('c = 0.7');
xlabel('Time (s)');
ylabel('Output Variable x(t) (no units)');
legend('Damping c = 0.7');
grid;
subplot(3,2,6);
plot(t, y4, 'b');
title('c = 1.0');
xlabel('Time (s)');