diff --git a/Programmiersprachen/matlab.tex b/Programmiersprachen/matlab.tex new file mode 100644 index 0000000..7cbf13d --- /dev/null +++ b/Programmiersprachen/matlab.tex @@ -0,0 +1,34 @@ +\SelectInputMappings{adieresis={ä}, germandbls={ß}} + +\definecolor{MyDarkGreen}{rgb}{0.0,0.4,0.0} +\definecolor{MyBeautyfulPurple}{rgb}{0.72,0.33,0.82} +\definecolor{MyBeautyfulBlue}{RGB}{072,118,255} + +\lstdefinestyle{Matlabcode}{ + language=Matlab, + belowcaptionskip=1\baselineskip, + breaklines=true, %Schaltet Zeilenumbruch ein + frame=L, %Erzeugt Strich links oder Rahmen mit single + xleftmargin=0pt, + breaklines=true, + showstringspaces=false, + basicstyle=\footnotesize\ttfamily, + keywordstyle=\bfseries\color{MyBeautyfulBlue}, + keywordstyle=\color{black},% + identifierstyle=\color{black},% + commentstyle=\usefont{T1}{pcr}{m}{sl}\color{MyDarkGreen}\small, + stringstyle=\color{MyBeautyfulPurple}, + emph=[1]{function,for,end,break},emphstyle=[1]\color{MyBeautyfulBlue} +} +%Im Hauptfile unter begin{document} folgendes einfügen +% \input{matlab.tex} + + +%Um nun Inline Code zu schreiben +% \begin{lstlisting}[style=Matlabcode] +% Code here +% \end{lstlisting} + + +%Um Code aus einer MatlabL-Datei zu importieren +% \lstinputlisting[style=Matlabcode]{matlab.m}