Nicematrix in unendlicher Größe

Nicematrix in unendlicher Größe

Ich versuche, eine Nicematrix-Version dieser tridiagonalen (unendlich großen) Matrix zu schreiben, da die pmatrix-Umgebung eine sehr hässliche Version rendert

\begin{equation}
\begin{pmatrix}
    -\lambda & \lambda             & 0                    & 0       & \dots  \\
    \mu      & -(\lambda+\mu)      & \lambda              & 0       &        \\
    0        & 2\mu                & -(\lambda+2\mu)      & \lambda &        \\
    \vdots   &                     & \ddots               & \ddots  & \ddots
\end{pmatrix}
\end{equation}

Also schrieb ich naiv

\begin{equation}
\begin{pNiceMatrix}
    -\lambda & \lambda             & 0                    & 0       & \Cdots  \\
    \mu      & -(\lambda+\mu)      & \lambda              & 0       &        \\
    0        & 2\mu                & -(\lambda+2\mu)      & \lambda &        \\
    \Vdots   &                     & \Ddots               & \Ddots  & \Ddots
\end{pNiceMatrix}
\end{equation}

Aber das Ergebnis funktioniert überhaupt nicht

Ich vermute, das Problem liegt darin, dass ich kein Ende für meine \Ddots angeben kann. Aber wie soll ich dann Matrizen mit unendlicher Größe verwalten?

Bearbeiten

Ich stelle ein vollständiges Minimalbeispiel mit der Dokumentklasse bereit, in der ich arbeite.

\documentclass{article}

\usepackage{nicematrix}

\begin{document}
\begin{equation}
\begin{pNiceMatrix}
    -\lambda & \lambda             & 0                    & 0       & \Cdots  \\
    \mu      & -(\lambda+\mu)      & \lambda              & 0       &        \\
    0        & 2\mu                & -(\lambda+2\mu)      & \lambda &        \\
    \Vdots   &                     & \Ddots               & \Ddots  & \Ddots
\end{pNiceMatrix}
\end{equation}
\end{document}

Die Ergebnisse der Kompilierung sehen etwas anders aus als die von mir bereitgestellten Bilder, da ich ein Schriftartenpaket hatte. Aber das Problem besteht immer noch.

Antwort1

Die Befehle \Ldots, \Cdots, \Vdots, \Ddots, und \Iddotssind für die Verwendung zwischen Zellen vorgesehen, die nicht leer sind. So können Sie die Zellen machen \NotEmpty.

Bildbeschreibung hier eingeben

\documentclass{article}

\usepackage{nicematrix}

\begin{document}

\[
\begin{pNiceMatrix}
    -\lambda  & \lambda        & 0               & 0         & \Cdots  \\
    \mu       & -(\lambda+\mu) & \lambda         & 0         &         \\
    0         & 2\mu           & -(\lambda+2\mu) & \lambda   &         \\
    \Vdots    &                & \Ddots          & \Ddots    & \Ddots  \\
    \NotEmpty &                &                 & \NotEmpty & \NotEmpty
\end{pNiceMatrix}
\]

\end{document}

Antwort2

Mit \phantomreicht Dir vielleicht?

\documentclass[border=5mm]{standalone}
\usepackage{nicematrix}
\begin{document}
$\begin{pNiceMatrix}
    -\lambda & \lambda             & 0                    & 0       & \Cdots  \\
    \mu      & -(\lambda+\mu)      & \lambda              & 0       &        \\
    0        & 2\mu                & -(\lambda+2\mu)      & \lambda &        \\
    \Vdots   &                     & \Ddots               & \Ddots  & \Ddots\\
\phantom{}&\phantom{}&\phantom{}&\phantom{.}&\phantom{.}
\end{pNiceMatrix}$
\end{document}

Bildbeschreibung hier eingeben

verwandte Informationen