[Tugindia] Matrix Column alignments

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Sat Jul 26 12:04:42 CEST 2003


Ashis Kumar Mal schrieb:

> Unfortunately, I could not get it work.
> Here is my code

please give full working examples, then it is
easier to see what is wrong. You must copy the preamble
of the following example into your doc

Herbert

\documentclass{article}
\usepackage{amsmath}
\makeatletter
\def\env at matrix{\hskip -\arraycolsep
    \let\@ifnextchar\new at ifnextchar
    \array{*\c at MaxMatrixCols r}}
\makeatother
\begin{document}

  \centerline{\bf Table I::DCT Matrix (N=8)}% Heading
\[
\begin{vmatrix}C(0)\\C(1)\\C(2)\\C(3)\\C(4)\\C(5)\\C(6)\\C(7)
\end{vmatrix}
=
\begin{vmatrix}
  1.000&  1.000&  1.000&  1.000&  1.000&  1.000&  1.000&  1.000  \\
  0.981&  0.831&  0.556&  0.195& -0.195& -0.556& -0.831& -0.981  \\
  0.924&  0.383& -0.383& -0.924& -0.924& -0.383&  0.383&  0.924  \\
  0.831& -0.195& -0.981& -0.556&  0.556&  0.981&  0.195& -0.831  \\
  0.707& -0.707& -0.707&  0.707&  0.707& -0.707& -0.707&  0.707  \\
  0.556& -0.981&  0.195&  0.831& -0.831& -0.195&  0.981& -0.556  \\
  0.383& -0.924&  0.924& -0.383& -0.383&  0.924& -0.924&  0.383  \\
  0.195& -0.556&  0.831& -0.981&  0.981& -0.831&  0.556& -0.195
\end{vmatrix}
\quad
\begin{vmatrix}f(0)\\f(1)\\f(2)\\f(3)\\f(4)\\f(5)\\f(6)\\f(7)
\end{vmatrix}
\]

\end{document}



More information about the tugindia mailing list