convert a vector of features to a matrix of features