Featured Book

LaTeX Beginners Guide

Who is online

In total there are 6 users online :: 1 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: Bing [Bot] and 5 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

Problem with creating a matrix

Add tags Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).

Problem with creating a matrix

Postby alpha on Wed Sep 16th, 2009

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)
alpha
 
Posts: 5
Joined: Tue Aug 11th, 2009

Re: Problem with creating a matrix

Postby Stefan_K on Wed Sep 16th, 2009

Hi,

the reason is that amsmath uses 10 array columns internally. You could adjust that by setting the counter MaxMatrixCols:
Code: Select all  •  Open in writeLaTeX
\setcounter{MaxMatrixCols}{11}

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6421
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: Problem with creating a matrix

Postby alpha on Wed Sep 16th, 2009

@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)
alpha
 
Posts: 5
Joined: Tue Aug 11th, 2009


Return to Math & Science

Who is online

Users browsing this forum: Bing [Bot] and 5 guests