LaTeX forum ⇒ Math & ScienceProblem with creating a matrix

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
alpha
Posts: 5
Joined: Tue Aug 11, 2009 10:28 am

Problem with creating a matrix

Postby alpha » Wed Sep 16, 2009 7:04 pm

Hello!

I want to create a matrix having one row and multiple columns. I am doing it as follows:

\usepackage{amsmath}
\begin{equation}
y(k)=
\begin{bmatrix}
a_{0}&a_{1}&a_{2}&b_{1}&b_{2}&c_{1}&c_{2}&d_{1}&d_{2}&e_{1}&e{2}
\end{bmatrix}
\end{equation}

I am getting the error:

! Extra alignment tab has been changed to \cr.

The matrix currently has 11 columns. If I reduce the columns to 10, the error does not appear.

What can be the reason for this?

Thanks in advance
If we do not care about the environment now, it is going to be too late too soon !
(What you do not know about Pakistan http://www.pakpositive.com)

User avatar
Stefan Kottwitz
Site Admin
Posts: 8262
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Sep 16, 2009 7:08 pm

Hi,

the reason is that amsmath uses 10 array columns internally. You could adjust that by setting the counter MaxMatrixCols:
  1. \setcounter{MaxMatrixCols}{11}

Stefan
Site admin

alpha
Posts: 5
Joined: Tue Aug 11, 2009 10:28 am

Postby alpha » Wed Sep 16, 2009 7:13 pm

@Stefan_K!

Thank you very much! You saved my day!
If we do not care about the environment now, it is going to be too late too soon !
(What you do not know about Pakistan http://www.pakpositive.com)


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 3 guests