Mass-Spring-Damper system : ODE45 Solver Results


Underdamped case.

%
%   plotting the results 
%

figure(1); clf; orient tall;
subplot(2,1,1),plot(t,x);
xlabel('Time (sec.)');
ylabel('Displacement (m)');
title('Mass-Spring-Damper system : ODE45 solver result (underdamped case)')

subplot(2,1,2),plot(t,x_dot);
xlabel('Time (sec.)');
ylabel('Velocity (m/sec.)');

Critically damped case.

Overdamped case.