Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to solve Ax=B complex matrix system in F 77

Status
Not open for further replies.

asela23

Instructor
Feb 7, 2012
2
LK
Hi all

i want to solve a complex linear algebra equation in the form of
Ax = B. ( A, B are known and need to find B)
where A and B are complex.. A(n,n) & B (n,1) & x (n,1)

i want this to be solved using Fortran 77.

I've used Linpack solvers to solve Ax=B , when A,B,x all are real values
call solver (A,B,NETOT,1,z)
solver contains Linpack subroutines
but the same code does not work when A,B are complex matrices

 
Do you have a list of all the functions you have access to? There must be a couple of functions for solving a set of this type, one function for real and the same function with a 'c' (for complex) as a first letter for a complex values system.

This page has some functions listed there...
 
Are you expecting x to be complex or real?

If x is real, then all you need to fill in is the real part of the complex number into A and B and check it with the imaginary part of A and B. If the imaginary part doesn't match then there is no solution. It is a different problem if x is complex.
 
Thanks a lot xwb and salgerman for your kind attention

in my problem of Ax = B , all i know is i ve got A and B matrices like given from previous calculations.

in A matrix some values are having only real parts and others are having both real and imaginary parts.

in B matrix all the values are imaginary values (it is a column matrix actually)

x matrix is THE one i need as solution , and it is unknown.

 
Hi asela23

there are different ways to solve the linear system Ax = b. From your first post you I see that x and b are vectors and A is symmetric. You get x by inverting the coefficient matrix A -> x = A^-1 b.
Inversion of A can be done by an iterative method like preconditioned conjugated gradients, quasi minimal residual or directly by a LU decomposition. If you have the intel compiler you can use the mkl library that comes with the compiler, there are linear system solvers included.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top