% ex9 syms g l Ts m positive A=[0 1;-g/l 0] B=[0 ; 1/(m*l)] Ad=simplify(expm(A*Ts)) Bd=simplify(inv(A)*(Ad-eye(2))*B)