I have downloaded a library from this site that deals with Matrix and Complex........Does it do this correctly???
http://www.zenautics.com/matrixdoc/index.html
if so I want to use this library to get the inverse matrix of of a matrix consists of a complex elements
how can I do this???
If it is a wrong one
can any one help me to get a library do this function please
thanks in advance

Edited 6 Years Ago by M.FARAG: n/a

Can I assume you installed the library and linked it already?

yes u can
It works well with real elements but for complex there is a problem that the output is wrong..
maybe I'm using wrong way

It works well with real elements but for complex there is a problem that the output is wrong..
maybe I'm using wrong way

Can you send us some of the code that you used? That would help me deciepher if there is a problem with the library, or your code :P. XD

Edited 6 Years Ago by Shinedevil: n/a

see this

case ('C'):     //Generating G matrix
				{  double Value=(w*A[i].Value);
					complex<double> C1(0,Value) ;
						for(j=0 ; j<No_Nodes ; j++ )
						   for( k=0 ; k<No_Nodes ; k++ )
							  {
							     if(((N1==(j+1))||(N2==(k+1)))&&(j==k))
								    G(j,k) += C1 ;
							     if((j!=k)&&((N1==(j+1))&&(N2==(k+1)))||((N1==(k+1))&&(N2==(j+1))))
									G(j,k) -= C1 ;
							   }

	Matrix Gin=G.Inverse();
cout<<endl<<"G matrix = \n"<<endl;
G.PrintStdout();
Gin.PrintStdout();  here is the problem the output of Gin is wrong

>> I have downloaded a library from this site that deals with Matrix and Complex

You do realize that C++ has its own complex class. Why don't you
use another application online to verify your answer.

Wouldn't a question to the folks that wrote the code yield better and faster answers? Just a thought...

This article has been dead for over six months. Start a new discussion instead.