code: public static DMatrixRMaj extractColumn(DMatrixRMaj a , int column , DMatrixRMaj out ) {
          if( out == null)
              out = new DMatrixRMaj(a.numRows,1);
          else if( !MatrixFeatures_DDRM.isVector(out) || out.getNumElements() != a.numRows )
              throw new MatrixDimensionException("Output must be a vector of length "+a.numRows);
  
          int index = column;
          for (int i = 0; i < a.numRows; i++, index += a.numCols ) {
              out.data[i] = a.data[index];
          }
          return out;
      }
docs: Extracts the column from a matrix.
  @param a Input matrix
  @param column Which column is to be extracted
  @param out output. Storage for the extracted column. If null then a new vector will be returned.
  @return The extracted column.