Math & ScienceProblem with align and array

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
adnaniut
Posts: 11
Joined: Tue Aug 10, 2010 1:23 am

Problem with align and array

Post by adnaniut »

I am getting a warning for the following part of code. Can anyone help me in it,

Thanks,
Adnan

Code: Select all

\begin{align*}
\setcounter{MaxMatrixCols}{20}
\left[
\displaystyle \begin{array}{ccccccccccccc}
\frac{1-q_2^}{q_2^n} & \frac{1-q_2}{q_2^{n-1}} & \frac{1-q_2}{q_2^{n-2}}  &\cdots & \frac{1-q_2}{q_2} & \frac{1}{q_2} & 1 & 0 & \cdots &0
\end{array}\right] \times
\left[
\begin{array}{c}
1 \\
\vdots \\
\vdots \\
\vdots \\
1 \\
\end{array}\right]
= \frac{1 + q_2^n}{q_2^n}
\end{align*}
! Missing { inserted.
<to be read again>
\endgroup
1.750 \end{align*}

Recommended reading 2024:

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

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Problem with align and array

Post by frabjous »

I think the problem is with the first fraction in the 10-column array where you have:

Code: Select all

\frac{1-q_2^}{q_2^n}
You don't have anything in the superscript in the numerator and I think that's confusing it and throwing everything off. Perhaps you mean something like:

Code: Select all

\frac{1-q_2^n}{q_2^n}
But it would be easier to test with a proper minimal working example rather than a snippet. In particular, what's going on with that counter? Since that counter isn't defined in what you posted, I just removed that line.
adnaniut
Posts: 11
Joined: Tue Aug 10, 2010 1:23 am

Re: Problem with align and array

Post by adnaniut »

Thanks very much. It solved my problem. It was a part of long code, for which counter was used.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Problem with align and array

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic accordingly as clearly written in Section 3 of the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.


Thorsten
Post Reply