function xdot=Inverted_pendulum_eq_dimless(t,x) global g A omega R dimless_factor; %x(1)=angle %x(2)=angle time derivative xdot(1)=x(2); xdot(2)=(1-dimless_factor*sin(omega*t))*sin(x(1)); xdot=xdot';