[Tex/LaTex] Aligning minipage in line with text and not at top of page

floatsminipage

So I have a page of text and then two figures side by side in a minipage. This is supposed to be at the bottom of the page, however is appearing at the top out of nowhere. How do I keep this at the bottom after the written text?

LOAD OF TEXT......
\begin{align}
f_{n} = a_{0}x_{n} + a_{1}x_{n-1}
\end{align}

where we take $|a_{0}| + |a_{1}| = 1$. For example, both $a_{0}$ and  $a_{1}$ could be $1/2$ resulting in

\begin{align}
f_{n} = \frac{x_{n} + x_{n-1}}{2}.
\end{align}

From this, we can define the transfer function for this filter

\begin{align}
\begin{split}
h(k)&=a_{0}+a_{1}e^{-i2\pi kt_{0}}\\
&=a_{0}+a_{1}(cos(2\pi t_{0}k)-i sin(2\pi t_{0}k)
\end{split}
\end{align}


\begin{align}
\begin{split}
|h(k)|^{2} = a_{0}^{2}+a_{1}^{0} + 2a_{0}a_{1}cos(2\pi t_{0}k)
\end{split}
\end{align}

\begin{figure}

\begin{minipage}{.5\textwidth}
    \centering
    \includegraphics[width=.4\linewidth]{/Userspathtoimage}
    \caption{$|h|$}{The filter frequency response}
    \label{fig:test1}
\end{minipage}%
\begin{minipage}{.5\textwidth}
    \centering
    \includegraphics[width=.4\linewidth]{/Users/pathtoimage}
    \caption{phase($|h|$)}{The filter phase response}
    \label{fig:test2}
\end{minipage}
\end{figure}

enter image description here

Best Answer

To place the figure at the bottom of the page, use the option [b]. If this does not work, as in the minimum working example (MWE) below, try [!b] but overall, read carefully How to influence the position of float environments like figure and table in LaTeX?

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\lipsum[1-1]
\begin{figure}[!b]
\rule{5cm}{5cm}\hfill\rule{5cm}{5cm}
\caption{xxxx}  
\end{figure}
\lipsum[2-10]
\end{document}