  Let $C$ be a curve in $\mathbb{P}^4$ and $X$ be a hypersurface containing it.
We show how it is possible to construct a matrix factorization on $X$ from the
pair $(C,X)$ and, conversely, how a matrix factorization on $X$ leads to curves
lying on $X$. We use this correspondence to prove the unirationality of the
Hurwitz space $\mathcal{H}_{12,8}$ and the uniruledness of the Brill-Noether
space $\mathcal{W}^1_{13,9}$. Several unirational families of curves of genus
$16 \leq g \leq 20$ in $\mathbb{P}^4$ are also exhibited.
