Created constructor which takes a vector for the matrix data