clear;
c=1;k=10;m=1;yset=0.1;
f=k*yset;
dydt=@(t,y) [y(2);(f-c*y(2)-k*y(1))/m];
[t,y]=ode45(dydt,[0,10],[0;0]);
plot(t,y(:,1),t,yset*ones(length(t),1),'-.');grid('on');
xlabel('Time[s]');ylabel('Height[m]');