[t1, x1]=ode45(@sp, [0,40], [1,0],[], 5); %La funcion sp es la ultima definida
plot(t1,x1(:,1)); hold on; grid on
[t2, x2]=ode45(@sp, [0,40], [1,0],[], 40);
plot(t2,x2(:,1))
[t3, x3]=ode45(@sp, [0,40], [1,0],[], 200);
plot(t3,x3(:,1))
%titulo, nombres de ejes y leyenda
title('Desplazamiento'); ylabel('x (m)'); xlabel('t (s)');
legend('c=5','c=40','c=200');

Funcion de transferencia del muelle. Si no esta al final no se la puede llamar

function x=sp(t,x,c)
x=[x(2); (-c*x(2)-20*x(1))/20];
end