Z_{0:k}
. I am not getting how to write the condition in between the lines and still keep the size of the matrix same both sides.Math & Science ⇒ Alignment for Condition inside Matrix
-
- Posts: 10
- Joined: Mon Jun 18, 2012 10:06 am
Alignment for Condition inside Matrix
Can someone please help me writing this equation? Especially the condition part with
- Attachments
-
- The desired Equation.
- equation.jpg (18.69 KiB) Viewed 3983 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Alignment for Condition inside Matrix
Please post what you already have, of this equation. So readers would not have to type all from scratch, including what you already have and what's no problem for you.
Stefan
Stefan
LaTeX.org admin
-
- Posts: 10
- Joined: Mon Jun 18, 2012 10:06 am
Alignment for Condition inside Matrix
This is what I've tried so far.
Code: Select all
\begin{align}
\mathbf{P}_{k \mid k} &=
\mathbf{\begin{bmatrix}
\mathbf{P}_{xx} & \mathbf{P}_{xm} \\
\mathbf{P}^T_{xm} & \mathbf{P}_{mm}
\end{bmatrix}}_{k \mid k} \\
&= \mathbf{E}
\begin{bmatrix}
\begin{pmatrix}
\mathbf{x}_k-\hat{\mathbf{x}_k} \\
\mathbf{m}-\hat{\mathbf{m}_k}
\end{pmatrix}
& \begin{pmatrix}
\mathbf{x}_k-\hat{\mathbf{x}_k} \\
\mathbf{m}-\hat{\mathbf{m}_k}
\end{pmatrix}^T
& \mid\mathbf{Z}_{0:k}
\end{bmatrix} \nonumber
\end{align}
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Alignment for Condition inside Matrix
You could use
And I would write the math accents differently, i.e.
Stefan
\left[
and \right]
instead of the outer bmatrix
in the second line:Code: Select all
\begin{align}
\mathbf{P}_{k \mid k} &= \mathbf{\begin{bmatrix}
\mathbf{P}_{xx} & \mathbf{P}_{xm} \\
\mathbf{P}^T_{xm} & \mathbf{P}_{mm}
\end{bmatrix}}_{k \mid k} \\
&= \mathbf{E}\left[
\begin{pmatrix}
\mathbf{x}_k-\hat{\mathbf{x}_k} \\
\mathbf{m}-\hat{\mathbf{m}_k}
\end{pmatrix} \begin{pmatrix}
\mathbf{x}_k-\hat{\mathbf{x}_k} \\
\mathbf{m}-\hat{\mathbf{m}_k}
\end{pmatrix}^T \mid\mathbf{Z}_{0:k}
\right] \nonumber
\end{align}
\hat{\mathbf{m}}_k
instead of \hat{\mathbf{m}_k}
, look at the position of the accent.Stefan
LaTeX.org admin
-
- Posts: 10
- Joined: Mon Jun 18, 2012 10:06 am
Re: Alignment for Condition inside Matrix
thanks stefan it was a simple mistake.. thanks for pointing it out..
cheers
cheers