code: public static void fillHermitian(ZMatrixRMaj A, double min, double max, Random rand) {
          if( A.numRows != A.numCols )
              throw new IllegalArgumentException("A must be a square matrix");
  
          double range = max-min;
  
          int length = A.numRows;
  
          for( int i = 0; i < length; i++ ) {
              A.set(i,i,rand.nextDouble()*range + min,0);
  
              for( int j = i+1; j < length; j++ ) {
                  double real = rand.nextDouble()*range + min;
                  double imaginary = rand.nextDouble()*range + min;
                  A.set(i,j,real,imaginary);
                  A.set(j,i,real,-imaginary);
              }
          }
      }
docs: Assigns the provided square matrix to be a random Hermitian matrix with elements from min to max value.
  
  @param A The matrix that is to be modified.  Must be square.  Modified.
  @param min Minimum value an element can have.
  @param max Maximum value an element can have.
  @param rand Random number generator.