I've got a State-Space system (4 matrices that go together), and rather than presenting each SS matrix on a new line I would like to group them together (and look nice while doing so).
I'm looking for the best way to do this.
The following code contains my 4 matrices (and works), but I encounter the following problems:
When I put
\begin{equation} \end{equation}
around my code it gives errorsAll matrices have different sizes. Is there some way to make the formatting more pretty?
\documentclass[11pt,a4paper]{article}
\begin{document}
$\begin{array}{ll}
A = \left[\begin{array}{cccc}
0&0&1&0\\
0&0&0&1\\
\frac{-k}{J_1}&\frac{k}{J_1}&\frac{-d}{J_1}&\frac{d}{J_1}\\
\frac{k}{J_2}&\frac{-k}{J_2}&\frac{d}{J_2}&\frac{-d}{J_2}
\end{array}\right] & B = \left[\begin{array}{c}
0\\0\\\frac{1}{J_1}\\0
\end{array}\right] \\
C = \left[\begin{array}{cccc}0&0&1&0\end{array}\right]& D = \left[\begin{array}{c}0\end{array}\right]\\
\end{array}$
\end{document}
The above code is an array size 2x2 with arrays on all elements. I've considered using
\begin{equation}
\begin{split}
A & =matrix1 B=matrix2 \\
C & =matrix3 C=matrix4
\end{split}
\end{equation
But this wont even compile.