Re: Diagonalize a matrix

Thanks for your quick reply. But I'm afraid the result I'm getting is:

0 0 0 . . . . . . . . .

. . . 2 2 2 . . . . . .

. . . . . . 8 8 8 . . .

. . . . . . . . . 0 0 0

What would be great - but didn't directly ask for above - is a dynamic method to transform the data. I can't think of a method to do the array-declaration "array vals{12} x11-x13 x21-x23 x31-x33 x41-x43;" with a macro-variable.