
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 \Iddots
sind für die Verwendung zwischen Zellen vorgesehen, die nicht leer sind. So können Sie die Zellen machen \NotEmpty
.
\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 \phantom
reicht 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}