The LU_COMPLEX function solves an n by n complex linear system Az = b using LU decomposition. The result is an n -element complex vector z . Alternatively, LU_COMPLEX computes the generalized inverse of an n by n complex array. The result is an n by n complex array.
This routine is written in the IDL language. Its source code can be found in the file
lu_complex.pro
in the
lib
subdirectory of the IDL distribution.
Define a complex array A and right-side vector B :
A = [[COMPLEX(1, 0), COMPLEX(2,-2), COMPLEX(-3,1)], $
[COMPLEX(1,-2), COMPLEX(2, 2), COMPLEX(1, 0)], $
[COMPLEX(1, 1), COMPLEX(0, 1), COMPLEX(1, 5)]]
B = [COMPLEX(1, 1), COMPLEX(3,-2), COMPLEX(1,-2)]
Solve the complex linear system Az = b .
( 0.552267, 1.22818)( -0.290371, -0.600974)
Compute the inverse of the complex array A by supplying a scalar for B (in this example -1).
inv = LU_COMPLEX(A, B, /INVERSE)
( 0.261521, -0.0303485)( 0.0138629, 0.329337)
( 0.102660, 0.168602)( 0.0340952, -0.162982)