Generate numerical matrix of data