Exact solution of a 1d asymmetric exclusion model using a matrix formulation