Mass-Spring system : Closed form result


Closed Form Solution Result.

%
%   plotting the results 
%

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

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