\documentclass{article}
\usepackage{graphicx}
\usepackage[latin1]{inputenc}
\usepackage{color} %\definecolor
\usepackage{listings} %Programmcodeumgebung für Matlab Code
\usepackage{microtype} %Captions im Programmcode
\usepackage[german=quotes]{csquotes}
\definecolor{bgcolor}{rgb}{0,0,0}
\definecolor{string}{rgb}{1,0,0}
\definecolor{darkblue}{rgb}{0,0,.75}
\definecolor{darkred}{rgb}{.75,0,0}
\definecolor{darkgreen}{rgb}{0,.75,0}
\lstloadlanguages{Matlab}
\lstnewenvironment{MatlabCode}[1][]
{\microtypesetup{activate=true} %Captions im Programmcode
\lstset{
language= Matlab,
basicstyle=\ttfamily, %generell Schreibmaschinenschrift
basicstyle=\scriptsize,
keywordstyle=\color{darkblue},
commentstyle=\color{darkgreen},
stringstyle=\color{string},
backgroundcolor=\color{white}, %Hintergrundfarbe
showstringspaces=false, %In Strings keine Backspace zeichen breaklines=true,
captionpos=b, %Beschriftungsposition
numbers = left, %links Zeilennummern
xleftmargin=.04\textwidth,
%frame=single, %shadowbox, leftline, lines, topline, t, r, b, l
#1}
}
{}
%\includegraphics{Bilder/}
\begin{document}
\begin{MatlabCode}
H=0;
\end{MatlabCode}
\end{document}
Das ganze würde ich jetzt noch gern mit einer Caption versehen und einem label? irgendwie war ich dafür zublöd um darauß schlau zuwerden was mir google gesagt hat
