code: public static SimpleMatrix diag( double ...vals ) {
          DMatrixRMaj m = CommonOps_DDRM.diag(vals);
          SimpleMatrix ret = wrap(m);
          return ret;
      }
docs: <p>
  Creates a matrix where all but the diagonal elements are zero.  The values
  of the diagonal elements are specified by the parameter 'vals'.
  </p>
  
  <p>
  To extract the diagonal elements from a matrix see {@link #diag()}.
  </p>
  
  @see CommonOps_DDRM#diag(double...)
  
  @param vals The values of the diagonal elements.
  @return A diagonal matrix.