This project has moved. For the latest updates, please go here.

Creating matrix from list of vectors

Jun 17, 2011 at 4:10 PM


In Math.Net iridium I was able to create a matrix from a list of column vectors using


Is there a replacement in Math.Net numerics?



Jun 18, 2011 at 12:52 PM

Hi Andrew,

That method seems to have been dropped when we merged the two different matrix classes. If you would like us to add it back, please create a feature request. 

You could also use the Matrix SetColumn method.

var vectors = new List<Vector>();
// add data
var matrix = new DenseMatrix(vectors[0].Count, vectors.Count); //assuming each vector is the same length
for (var i = 0; i < 10; i++){
   matrix.SetColumn(i, vectors[i]);