$$ \dot{x} = Ax+Bu $$
So, then
$$ x = \begin{bmatrix} x \\ v \\ \theta \\ \omega \end{bmatrix} $$
and
$$ \dot{x} = \begin{bmatrix} v \\ a \\ \omega \\ \alpha \end{bmatrix} $$
we know
$$ u=F $$
now for A and B which are linearized about vertical position fixed point.
$$ x^{\star} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \end{bmatrix} $$
new state
$$ x=x-x^\star $$
now for A and B we get the following equations:
$$ A = \begin{bmatrix} 0 & 1 & 0 & 0 \\ 0 & 0 & -mg/M & 0 \\ 0 & 0 & 0 & 1\\ 0 & 0 &(M+m)g/(lM)& 0 \end{bmatrix} , B = \begin{bmatrix} 0 \\ 1/M\\ 0 \\ -1/Ml \end{bmatrix} $$
now numerical solution for
$$ x_{t+1}=? $$
$$ (x_{t}-x_{t-1})/\delta t= \dot{x} $$
for cart velocity
$$ v_{t+1}=v_{t}+(-mg/M\theta_{t}+F/M)*\delta t $$