public static RealVector getColumn(int column, RealMatrix m) { RealVector v = new RealVector(m.Count()); int i = 0; foreach (List<double> vecM in m) { v[i] = vecM[column]; i++; } return v; }