TransposeConjugate

Transposição de uma matriz complexa com conjugação. Desenvolve ou reorganiza os eixos da matriz alterando o sinal da parte imaginária dos números complexos, retornando a matriz modificada.

matrix matrix::TransposeConjugate()

Valor retornado

Matriz transposta e conjugada complexa.

Note

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

Algoritmo simples de transposição de uma matriz complexa com conjugação – explicação do 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);
  }