code: public static void convert(DMatrixD1 input , ZMatrixD1 output ) {
          if( input.numCols != output.numCols || input.numRows != output.numRows ) {
              throw new IllegalArgumentException("The matrices are not all the same dimension.");
          }
  
          Arrays.fill(output.data, 0, output.getDataLength(), 0);
  
          final int length = output.getDataLength();
  
          for( int i = 0; i < length; i += 2 ) {
              output.data[i] = input.data[i/2];
          }
      }
docs: Converts the real matrix into a complex matrix.
  
  @param input Real matrix. Not modified.
  @param output Complex matrix. Modified.