Posted Sunday, May 11, 2008 2:43 PM
|
|
|
|
Hello 
I am using complex number Matrix and would like to check the values on it. How could I do it with standart
std::complex complex number to use with Console::WriteLine();
and what I must add to my project to be allowed
CMatrix ^A = gcnew CMatrix(50, 50);
std::complex ans (real(A->Determinant()), 0);
|
|
Posted Sunday, May 11, 2008 4:15 PM
|
|
|
|
| .NET Matrix Library defines the Bluebit::MatrixLibrary::Complex structure in order to handle complex numbers. Please test the following code: int main(array<System::String ^> ^args) { CMatrix^ A= gcnew CMatrix(4, 4); A->FillRandom(); //Print all matrix elements Console::WriteLine(A); //Print top left element Console::WriteLine("This is top left element {0}", A[0,0].ToString() ); Complex c = A->Determinant(); Console::WriteLine("The determinant is equal to {0}", c.ToString()); Console::ReadLine(); return 0; }
Trifon Triantafillidis | Lead Developer |
|
|
|
Posted Monday, May 12, 2008 12:10 PM
|
|
|
|
Thank you wery much for your answer It was wery helpful 
In Class CMatrix I have only round to ones values when I use FillRandom(2.5.2.7), but I need double precision values. How could I do this ?
|
|
Posted Monday, May 12, 2008 12:24 PM
|
|
|
|
You can use the 3rd parameter of the FillRandom method which specifies the rounding of the random values.
Trifon Triantafillidis | Lead Developer |
|
|
|
|
|