\documentclass[12pt,a4paper,austrian]{article}
\usepackage{graphicx}
\usepackage[austrian, english]{babel}
\usepackage[utf8]{inputenc}
%\usepackage{listings}
\usepackage{multirow}
\usepackage{epstopdf}
\usepackage{amsmath}
\usepackage{amssymb} % fuer Mengen \N, Q, C, R
\graphicspath{{./fig/}}


%% Satzspiegel
\setlength{\hoffset}{-1in} \setlength{\textwidth}{18cm}
\setlength{\oddsidemargin}{1.5cm}
\setlength{\evensidemargin}{1.5cm}
\setlength{\marginparsep}{0.7em}
\setlength{\marginparwidth}{0.5cm}

\setlength{\voffset}{-1.9in}
\setlength{\headheight}{12pt}
\setlength{\topmargin}{2.6cm}
   \addtolength{\topmargin}{-\headheight}
\setlength{\headsep}{3.5cm}
   \addtolength{\headsep}{-\topmargin}
   \addtolength{\headsep}{-\headheight}
\setlength{\textheight}{27cm}

%% How should floats be treated?
\setlength{\floatsep}{12 pt plus 0 pt minus 8 pt}
\setlength{\textfloatsep}{12 pt plus 0pt minus 8 pt}
\setlength{\intextsep}{12 pt plus 0pt minus 8 pt}

\tolerance2000
\emergencystretch20pt

%% Text appearence
% English text
\newcommand{\eg}[1]%
  {\selectlanguage{english}\textit{#1}\selectlanguage{austrian}}

\newcommand{\filename}[1]
  {\begin{small}\texttt{#1}\end{small}}

\newcommand\IFT{\unitlength1mm\begin{picture}(10,2) \put (1,1)
{\circle{1.7}} \put(2,1){\line(1,0){5}} \put(8,1)
{\circle*{1.7}}\end{picture}}
\newcommand\FT{\unitlength1mm\begin{picture}(10,2) \put (1,1)
{\circle*{1.7}} \put(2,1){\line(1,0){5}} \put(8,1)
{\circle{1.7}}\end{picture}}

% A box for multiple choice problems
\newcommand{\choicebox}{\fbox{\rule{0pt}{0.5ex}\rule{0.5ex}{0pt}}}

\newenvironment{wahrfalsch}%
  {\bigskip\par\noindent\makebox[1cm][c]{richtig}\hspace{3mm}\makebox[1cm][c]{falsch}
   \begin{list}%
   {\makebox[1cm][c]{\choicebox}\hspace{3mm}\makebox[1cm][c]{\choicebox}}%
   {\setlength{\labelwidth}{2.31 cm}\setlength{\labelsep}{3mm}
    \setlength{\leftmargin}{2.61 cm}\setlength{\listparindent}{0pt}
    \setlength{\itemindent}{0pt}}%
  }
  {\end{list}}

\newcounter{theaufgabe}\setcounter{theaufgabe}{1}
\newenvironment{aufgabe}[1]%
  {\bigskip\par\noindent\begin{nopagebreak}
   \textsf{\textbf{\arabic{theaufgabe}.\thinspace Exercise}}\quad
      \textsf{\textit{#1}}\\*[1ex]%
\stepcounter{theaufgabe}\hspace{2ex}\end{nopagebreak}}
  {\par\pagebreak[2]}

% Innerhalb der Aufgaben erfolgt die weitere Unterteilung mittels einer
% enumerate Umgebung, die allerdings a), b),... zaehlen soll.
\renewcommand{\labelenumi}{\alph{enumi})}
\renewcommand{\labelenumii}{\arabic{enumii})}

% A box to tick for everything which has to done
\newcommand{\abgabe}{\marginpar{$\Box$}}
% Margin paragraphs on the left side
\reversemarginpar

% Language for listings
%\lstset{language=Vhdl,
%  basicstyle=\small\tt,
 % keywordstyle=\tt\bf,
 % commentstyle=\sl}

% No indention
\setlength{\parindent}{0.0cm}
% Don't number sections
\setcounter{secnumdepth}{0}


%% Beginning of the text

\begin{document}
\selectlanguage{austrian}
\pagestyle{plain}


%===  This is the header section ============================================================
\thispagestyle{empty}
\noindent
\begin{minipage}[b][4cm]{1.0\textwidth}
\begin{center}
\begin{bf}
\begin{large} Digitale Signalverarbeitung SS 2025/26 -- 2.~Aufgabe\end{large} \\
\vspace{0.3cm}
\begin{Large} Analog Signals and Systems \end{Large} \\
\vspace{0.3cm}
\end{bf}
\begin{large}
Gruppennummer 211 \\
Manuel Illmayer,  k12308149 \\
Quirin Ecker, k12310122 \\
\end{large}
\end{center}
\end{minipage}

\noindent \rule[0.8em]{\textwidth}{0.12mm}\\[-0.5em]
%=======================================================================================

\begin{aufgabe}

	\begin{enumerate}
		\item add back in
		\item add back in
		\item add back in
		\item add back in
		\item (see assignment2\_1.m)
		\item table:
			\begin{table}[h]
				\centering
				\begin{tabular}{|c|c|c|}
				\hline
				Signal & Energy & Power \\
				\hline
				$x_1[n]$ & 37  & --     \\
				$x_2[n]$ & 48.0394  & --     \\
				$x_3[n]$ & 1152  & 4.4825 \\
				$x_4[n]$ & 128.9565  & --     \\
				\hline
				\end{tabular}
				\caption{Energy and Power Values}
				\label{tab:energy_power}
			\end{table}
	\end{enumerate}

\end{aufgabe}

\begin{aufgabe}

	\begin{enumerate}
		\item $|x[n]| + |h[n]| - 1 = 5 + 4 - 1 = 8$
		\item
			\begin{gather*}

A=
\begin{bmatrix}
3 & 0 & 0 & 0\\
-1 & 3 & 0 & 0\\
2 & -1 & 3 & 0\\
0 & 2 & -1 & 3\\
1 & 0 & 2 & -1\\
0 & 1 & 0 & 2\\
0 & 0 & 1 & 0\\
0 & 0 & 0 & 1
\end{bmatrix},
\qquad
x=
\begin{bmatrix}
2\\
3\\
4\\
1
\end{bmatrix}

Ax=
\begin{bmatrix}
6\\
7\\
13\\
5\\
9\\
5\\
4\\
1
\end{bmatrix}
			\end{gather*}
	\end{enumerate}

\end{aufgabe}

\begin{aufgabe}

	\begin{enumerate}
		\item $L_y = |x[n]| + |h[n]| - 1 = 50 + 3 - 1 = 52$
		\item (see assignment2\_3.m)
		\item see d)
		\item figure: \\
			\includegraphics[width=0.95\textwidth]{fig/aufgabe3_cd.png}
	\end{enumerate}

\end{aufgabe}

\begin{aufgabe}

	\begin{enumerate}
		\item (see assignment2\_4.m)
		\item Phase Response is very small in the realm of $10^{-15}$. The signal contians multiple bigger spikes.  \\
			\includegraphics[width=0.95\textwidth]{fig/aufgabe4_b.png}
		\item The magnitued seems to be repeating and the phase response seems to be mirrored accross the x and y axis.
	\end{enumerate}

\end{aufgabe}


\begin{aufgabe}

	\begin{enumerate}
		\item (siehe assignment2\_5.m)
		\item (siehe assignment2\_5.m)
		\item figure: \\
			\includegraphics[width=0.95\textwidth]{fig/aufgabe5_c.png}
		\item original energy: 41343 \\ reverb energy: 2069.0506 \\ rir energy: $9.9997 \cdot 10^{3}$ \\
			explanation: The rir energy is less than one which would explain why the outcoming signal is smaller than the original, because convulution scales proportionally.
	\end{enumerate}




\end{aufgabe}

\end{document}
