SUBROUTINE printmat_c(matrix, rows, cols, iunit, title, tr)
COMPLEX(KIND=real_4), DIMENSION(:), INTENT(IN) :: matrix
INTEGER, INTENT(IN) :: rows, cols, iunit
CHARACTER(*), INTENT(IN), OPTIONAL :: title
LOGICAL, INTENT(IN), OPTIONAL :: tr
IF (PRESENT(title)) THEN
IF (PRESENT(tr)) THEN
CALL printmat_s(REAL(matrix, KIND=sp), rows, cols, iunit, title, tr)
ELSE
CALL printmat_s(REAL(matrix, KIND=sp), rows, cols, iunit, title)
END IF
ELSE
IF (PRESENT(tr)) THEN
CALL printmat_s(REAL(matrix, KIND=sp), rows, cols, iunit, tr=tr)
ELSE
CALL printmat_s(REAL(matrix, KIND=sp), rows, cols, iunit)
END IF
END IF
END SUBROUTINE printmat_c