TransposeConjugate

Transposición de una matriz compleja con conjugación. Desarrolla o reorganiza los ejes de la matriz alterando el signo de la parte imaginaria de los números complejos, devolviendo la matriz modificada.

matrixc matrixc::TransposeConjugate()

Valor devuelto

Matriz transpuesta y conjugada compleja.

Note

Conjugate can be applied to real (non-complex) matrix or vector. In this case matrix or vector just copied on return.

 

Algoritmo simple de transposición de una matriz compleja con conjugación – explicación del método

//--- Complex matrix transpose function with conjugation
matrixc MatrixTransposeConjugate(const matrixcmatrix_a)
  {
   //--- create a new matrix_c with dimensions inverse to matrix_a
   matrixc matrix_c(matrix_a.Cols(), matrix_a.Rows());
 
   //--- go through all the rows of the new matrix
   for(ulong i=0i<matrix_c.Rows(); i++)
     {
      //--- go through all the columns of the new matrix
      for(ulong j=0j<matrix_c.Cols(); j++)
        {
         //--- transfer the real part of the element by transposing the index
         matrix_c[i][j].real = matrix_a[j][i].real;
         //--- transfer the imaginary part of the element by changing the sign (conjugation)
         matrix_c[i][j].imag = -matrix_a[j][i].imag;
        }
     }
 
    //--- return the transposed matrix with conjugation
    return(matrix_c);
  }