public static double [ ] getCol ( double [ ] [ ] m1 , int col ) { double [ ] ret = new double [ m1 . length ] ; for ( int i = 0 ; i < ret . length ; i ++ ) { ret [ i ] = m1 [ i ] [ col ] ; } return ret ; }
Get a column from a matrix as vector .