function f=rock(t,y,alpha,p,time_r,record_dt,ug)


i=floor(t/record_dt);
if i<length(time_r)
a=ug(i)+(t-time_r(i))/(time_r(i+1)-time_r(i))*(ug(i+1)-ug(i));
else
    a=0;
end
x=alpha*sign(y(1))-y(1);
f(1,1)=y(2);
%f(2,1)=-p^2*(sin(x));
f(2,1)=-p^2*(sin(x)+a/9.81*cos(x));


