Hi Sam,
I was hoping that the OP would show a little more effort before giving the answer. Anyway ...
The code should be modified to use the 'all' input to coeffs so as to return the 0 coefficients as well. That way we can use dencoeff as well, which is what we'd want in general, and not return numeric A and D matrices
syms s alpha beta_1 beta_2
Gp = ((alpha + beta_2)*s^2 + 3*beta_1*s + 9*alpha)/(s^3 + 0*s^2 + 9*s + 0)
Gp =

[num, den] = numden(Gp)
num = 
den = 
[numcoeff, numterm] = coeffs(num, s, 'all')
numcoeff = 
numterm = 
[dencoeff, denterm] = coeffs(den, s, 'all')
dencoeff = 
denterm = 
[A, B, C, D] = tf2ss(numcoeff, dencoeff)
simplify(C*inv(s*eye(3)-A)*B + D)
ans =
