code: public static void elementMultiply(ZMatrixD1 input , double real , double imaginary, ZMatrixD1 output )
      {
          if( input.numCols != output.numCols || input.numRows != output.numRows ) {
              throw new IllegalArgumentException("The 'input' and 'output' matrices do not have compatible dimensions");
          }
  
          int N = input.getDataLength();
          for (int i = 0; i < N; i += 2 ) {
              double inReal = input.data[i];
              double intImag = input.data[i+1];
  
              output.data[i] = inReal*real - intImag*imaginary;
              output.data[i+1] = inReal*imaginary + intImag*real;
          }
      }
docs: <p>Performs  element by element multiplication operation with a complex numbert<br>
  <br>
  output<sub>ij</sub> = input<sub>ij</sub> * (real + imaginary*i) <br>
  </p>
  @param input The left matrix in the multiplication operation. Not modified.
  @param real Real component of the number it is multiplied by
  @param imaginary Imaginary component of the number it is multiplied by
  @param output Where the results of the operation are stored. Modified.