How can I convert a general ellipsoid equation into a vector form in MATLAB? What function can I use in MATLAB or how by hand can I convert the ellipsoid:
$$\frac{(x+12t-11)^2}{4}+y^2+z^2-1=0$$
into matrix form, from the form $X^\top {\rm A} X = 0$
$$X=\pmatrix{x \\ y \\ z \\ 1} $$
For correction and testing see the following




I got 
$$ \pmatrix{x \\ y \\ z \\ 1}^\top 
\begin{bmatrix} \frac{1}{4} &0 & 0 & \frac{12 t-11}{4} \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ \frac{12 t-11}{4} & 0 & 0 & \frac{3 (48 t^2-88 t+39)}{4} \end{bmatrix} \pmatrix{x \\ y \\ z \\1} =0 $$
How?
I matched coefficients with $$\pmatrix{x \\ y \\ z \\ 1}^\top \begin{bmatrix} A_{11} & & & A_{14} \\ & A_{22} & & & \\ &  & A_{33} & \\ A_{14} & & & A_{44} \end{bmatrix} \pmatrix{x \\ y \\ z \\ 1} =$$
$$ \frac{(x+12t-11)^2}{4}+y^2+z^2-1 = A_{11} x^2 +2 A_{14} x + A_{22} y^2 + A_{33} z^2 + A_{44} = 0$$
The reason I picked those elements of the coefficient matrix ${\rm A}$ is because the expression only contains terms of $x^2$, $x$, $y^2$, $z^2$ and a constant term.

In General
$$ \begin{bmatrix} A_{11} & 0 & 0 & A_{14} \\ 0 & A_{22} & 0 & A_{24} \\ 0 & 0 & A_{33} & A_{34} \\ A_{14} & A_{24} & A_{34} & A_{44} \end{bmatrix}  \Longrightarrow A_{11} x^2 + A_{22} y^2 + A_{33} z^2 + 2 A_{14} x + 2 A_{24} y + 2 A_{34} z + A_{44} = 0 $$
$$ \frac{(x-x_c)^2}{a^2} + \frac{(y-y_c)^2}{b^2} + \frac{(z-z_c)^2}{c^2} = 1 \Longrightarrow \begin{bmatrix}
  \frac{1}{a^2} & 0 & 0 & -\frac{x_c}{a^2} \\
  0 & \frac{1}{b^2} & 0 & -\frac{y_c}{b^2} \\
  0 & 0 & \frac{1}{c^2} & -\frac{z_c}{c^2} \\
  -\frac{x_c}{a^2} & -\frac{y_c}{b^2} & -\frac{z_c}{c^2} & \kappa^2-1
\end{bmatrix} $$
where $\kappa^2 = \frac{x_c^2}{a^2}+\frac{y_c^2}{b^2}+\frac{z_c^2}{c^2}$
