From: Dima Sorkin (dsorkin_at_[hidden])
Date: 2006-03-07 02:57:07
Quoting Alion Sci :
> Question 2: How do I use a "complex" matrix?
> If I make a 3x3 matrix and fill it with values it looks like this:
> //matrix 1
> However if I make a complex 3x3 matrix and fill it with values it looks like
> //matrix 2
> In the second matrix each ( ) was replaced with ( , )
> So, here are my question: How do you assign a value to both elements and
> not just first one?
I think here your problem is more with C++ , than with uBLAS.
You just assign a complex value to the entry:
matrix2(1,1) = z;
It will assign both to real and imaginary parts.