Math & ScienceMatrices within Table

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
CDuke
Posts: 3
Joined: Sun Jul 24, 2011 1:46 pm

Matrices within Table

Post by CDuke »

seems my new table doesn't work as i want it.I keep getting the warning that a $ must be inserted before the first \begin {bmatrix} on rule 9 of the code. Does someone see what i am doing wrong?
What the table must do is create matrix equation in the center row(except the first 2.)

Code: Select all

\begin{table}
\caption{Characteristic of each element of the electromechanical system}
\label{3tableofall}
\begin{center}
\begin{tabular}{lll}
System element&Element model&Element type\\
\hline\\
Electric circuit&
\begin {bmatrix}
v_t\\ i_m
\end {bmatrix}
=
\begin{bmatrix}
\sqrt{sL^2+R_m^2}&1\\
1&0}
\end{bmatrix}
\begin {bmatrix}
v_t\\ i_m
\end {bmatrix}
&Inductor \& resitor\\
Motor&
\begin {bmatrix}
v_t\\ i_m
\end {bmatrix}
=
\begin{bmatrix
\frac{1}{\tau_m}&0\\
0&\tau_m
\end{bmatrix}
\begin {bmatrix}
T_m\\ \omega_m
\end{bmatrix}
&Resistor\\

Load $J_1$&
\begin {bmatrix}
T_m\\ \omega_m
\end{bmatrix}
=
\begin {bmatrix}
sJ_1&1\\
1&0
\end{bmatrix}
\begin {bmatrix}
\omega_1\\ T_a
end{bmatrix}
&Capacitor\\

Spring \& damper&
\begin {bmatrix}
\omega_1\\ T_a
end{bmatrix}
=
\begin{bmatrix}
\frac{1}{sb+k}&1\\
1&0
\end{bmatrix}

\begin {bmatrix}
T_a\\ \omega_2
\end{bmatrix}
&Inductor\\

Load$J_2$&

\begin {bmatrix}
T_a\\ \omega_2
\end{bmatrix}
=
\begin{bmatrix}
sJ_2&1\\
 1&0
\end{bmatrix}
\begin{bmatrix}
omega_2\\ T_e
\end{bmatrix}}
&Capacitor\\
\end{tabular}
\end{center}
\end{table}
and does someone know how i can remove the chapter 1 which is created by \chapter{blabla}, but still keep numbering of equations from \numberwithin{equation}{chapter} in order?
\chapter*{blabla} seems to not count as a chapter for that purpose.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Matrices within Table

Post by localghost »

Please always provide a complete example that is reduced to only relevant code and compilable for everbody as provided [1]. It is essential for providing proper solutions especially when a problem is more complicated then this one here.
CDuke wrote:seems my new table doesn't work as i want it.I keep getting the warning that a $ must be inserted before the first \begin {bmatrix} on rule 9 of the code. Does someone see what i am doing wrong? […]
The »bmatrix« environment only works in math mode, therefore in this case has to be enclosed by $…$. That's exactly what the error message says.

Code: Select all

$\begin{bmatrix} … \end{bmatrix}$
CDuke wrote: […] and does someone know how i can remove the chapter 1 which is created by \chapter{blabla}, but still keep numbering of equations from \numberwithin{equation}{chapter} in order?
\chapter*{blabla} seems to not count as a chapter for that purpose.
Actually this is another type of question, thus shouldn't be mixed with the one above. The solution depends on the used document class. For the standard classes »book« and »report« you can insert this line in the preamble.

Code: Select all

\renewcommand{\theequation}{\arabic{equation}}
But use it with caution. References to equations now can cause irritations since there will be several appearances of e. g. equations tagged as (1). This also can cause trouble with the hyperref package (I'm pretty sure it will). Numbering equations this way is not recommendable.

[1] TeX Frequently Asked Questions — How to make a “minimum example”


Best regards and welcome to the board
Thorsten
Post Reply