code: public static void extract(ZMatrixRMaj src,
                                 int srcY0, int srcY1,
                                 int srcX0, int srcX1,
                                 ZMatrixRMaj dst,
                                 int dstY0, int dstX0 )
      {
          int numRows = srcY1 - srcY0;
          int stride = (srcX1 - srcX0)*2;
  
          for( int y = 0; y < numRows; y++ ) {
              int indexSrc = src.getIndex(y+srcY0,srcX0);
              int indexDst = dst.getIndex(y+dstY0,dstX0);
              System.arraycopy(src.data,indexSrc,dst.data,indexDst, stride);
          }
      }
docs: <p>
  Extracts a submatrix from 'src' and inserts it in a submatrix in 'dst'.
  </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.
  @param dst Where the submatrix are stored.  Modified.
  @param dstY0 Start row in dst.
  @param dstX0 start column in dst.