Seite 1 von 1

Matrizeninhalt ausrichten

Verfasst: Mo 4. Jan 2016, 17:07
von LatexNew
Hey Leute,

ich möchte die Einträge einer Matrix bündig zueinander ausrichten.
\begin{equation}
= \left(\begin{array} {cccc}
\ cos\theta_i   & -cos\alpha_i \cdot sin\theta_i & sin \alpha_i \cdot sin\theta_i   & a_i \cdot cos\theta_i    \\	 
\ sin \theta_i  & cos \alpha_i \cdot cos\theta_i & -sin\alpha_i \cdot cos\theta_i   & a_i \cdot sin\theta_i    \\
\ 0 	        & sin \alpha_i                   & cos \alpha_i                     & d_i  	                   \\
\ 0	            & 0                              & 0                                & 1                        \\
\end{array} \right) \\ 
\end{equation}
Mit welchen Befehl kann ich das machen? Vielen Dank!

Verfasst: Mo 4. Jan 2016, 20:12
von Besserwisser
Als erstes würde ich vermutlich die manuellen Leerzeichen weglassen und dann stellt sich natürlich die Frage: Inwiefern bündig? Es gibt bündig zur Grundlinie, linksbündig, rechtsbündig …

Außerdem wäre es schön, wenn das Beispiel so wäre, dass es auch im Online-Editor funktioniert: →Minimalbeispiel

Matrixinhalt ausrichten

Verfasst: Mo 4. Jan 2016, 22:00
von LatexNew
That's it:
\documentclass[12pt]{report}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathcomp}
\usepackage[utf8]{inputenc}


\usepackage[pdftex]{graphicx}
\usepackage{subfigure}
\usepackage{geometry}
\geometry{a4paper,top=25mm,left=25mm,right=20mm,bottom=30mm} 

\begin{document}

\begin{equation}
= \left(\begin{array} {cccc}
\ cos\theta_i   & -cos\alpha_i \cdot sin\theta_i & sin \alpha_i \cdot sin\theta_i   & a_i \cdot cos\theta_i    \\	 
\ sin \theta_i  & cos \alpha_i \cdot cos\theta_i & -sin\alpha_i \cdot cos\theta_i   & a_i \cdot sin\theta_i    \\
\ 0 	        & sin \alpha_i                   & cos \alpha_i                     & d_i  	                   \\
\ 0	            & 0                              & 0                                & 1                        \\
\end{array} \right) \\ 
\end{equation}

\end{document}
Ich möchte den Splateninhalt linksbündig ausrichten. Besten Dank!

Verfasst: Mo 4. Jan 2016, 22:24
von Bartman
Sofern es Deinem Anliegen entspricht, könntest Du die vier c Deiner array-Umgebung durch vier l ersetzen.

Bitte erkundige Dich, wie trigonometrische Funktionen im mathematischen Modus eingesetzt werden.