|
On Aug 2, 1:36 pm, "Bruno Luong" <b.lu...@fogale.findmycountry> wrote:
> "Peter Simon" <peterUNDERSCOREsi...@ieee.org> wrote in message <h54r9v$4v...@fred.mathworks.com>...
> > I need to solve systems of linear equations, N equations in N unknowns, where the coefficient matrix is complex, symmetric, non-hermitian, indefinite, and full. The order N is not particularly large, say, N=100. However, I need to do this hundreds of thousands of times within an optimization loop, for different coefficient matrices, all of which are of the form described above. I would like to know if there is some builtin Matlab functionality to exploit the symmetry of the matrix (please note that the matrix is not hermitian), similar to routines ZSYSV or ZSPSV of Lapack. If not, is there an efficient way to call these Lapack routines from Matlab? I am most interested in rapid calculation, but if exploiting the the matrix symmetry to reduce storage requirements does not cost executation time, I am also interested in doing that. Again, storage space is of interest because of the
> > very large number of matrices, many of which are stored and recalled, their entries are not computed on the fly as needed.
>
> > Thanks,
> > Peter
>
> Hi Peter,
>
> Simply use "\" operator: From the doc, after mldivide check six previous properties which all fail in your case, the it comes the seventh:
>
> 7. If A is not sparse but is symmetric, and the Cholesky factorization failed, then MATLAB solves the system using a symmetric, indefinite factorization. That is, MATLAB computes the factorization P'*A*P=L*D*L', and computes the solution X by X=P*(L'\(D\(L\(P*B)))). Computations are performed using the LAPACK routines in the following table (complex double, BL):
>
> ZLANHE, ZHETRF, ZHETRS, ZHECON
>
> Bruno
Thanks, Bruno.
Sounds like it should be fine using the backslash operator. Do you
know if I can tell Matlab to show me which algorithm it selected, just
to be sure? Also, can I direct it to use a particular algorithm
without wasting time checking?
--Peter
|