help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Printing complex matrices


From: Dimitrova, Maria
Subject: [Help-gsl] Printing complex matrices
Date: Wed, 28 Sep 2016 08:58:47 +0000

Hello,

What is the right way to print a complex matrix? I tried defining a function, 
however, separating the real and the imaginary components turned out 
impossible. Is there a way to define an analog of 
gsl_vector_complex_real(gsl_vector_complex *v) for matrices?

void printArrC(gsl_matrix_complex *matrix, int nrows)
{
    int i;
    printf("\n");
    for (i=0;i<nrows;i++)
    {
      gsl_vector_view row = gsl_matrix_row (matrix, i);
      gsl_vector_fprintf(stdout,&row.vector,"%f");
            printf("\n\n");
    }
    printf("\n\n");
}

Best regards,
Maria


reply via email to

[Prev in Thread] Current Thread [Next in Thread]