code: public static DMatrixRMaj extract(DMatrixRMaj src,
                                          int srcY0, int srcY1,
                                          int srcX0, int srcX1 )
      {
          if( srcY1 <= srcY0 || srcY0 < 0 || srcY1 > src.numRows )
              throw new MatrixDimensionException("srcY1 <= srcY0 || srcY0 < 0 || srcY1 > src.numRows");
          if( srcX1 <= srcX0 || srcX0 < 0 || srcX1 > src.numCols )
              throw new MatrixDimensionException("srcX1 <= srcX0 || srcX0 < 0 || srcX1 > src.numCols");
  
          int w = srcX1-srcX0;
          int h = srcY1-srcY0;
  
          DMatrixRMaj dst = new DMatrixRMaj(h,w);
  
          ImplCommonOps_DDRM.extract(src,srcY0,srcX0,dst,0,0, h, w);
  
          return dst;
      }
docs: <p>
  Creates a new matrix which is the specified submatrix of 'src'
  </p>
  <p>
  s<sub>i-y0 , j-x0</sub> = o<sub>ij</sub> for all y0 &le; i &lt; y1 and x0 &le; j &lt; x1 <br>
  <br>
  where 's<sub>ij</sub>' is an element in the submatrix and 'o<sub>ij</sub>' is an element in the
  original matrix.
  </p>
  
  @param src The original matrix which is to be copied.  Not modified.
  @param srcX0 Start column.
  @param srcX1 Stop column+1.
  @param srcY0 Start row.
  @param srcY1 Stop row+1.
  @return Extracted submatrix.