Reading data and creating VEC matrices