I asked this question before, but i was closed because it the question was not comprehensible enough. So i reworded it, hope that's ok.
I have a list with 6 elements.
{a1, a2, a3, a4, a5, a6}
Now, I want to generate a upper triangle matrix with the elements above as matrix elements, so that the matrix reads
{{a1, a4, a6}, {0, a2, a5}, {0, 0, a3}}
That is, the triangle upper matrix matrix shall be filled up with the elements of the list. It is not important where each element is placed.
I want to do this also with larger matrices, so for example a list with 36 elements shall form a 8 x 8 upper triangle matrix.
Any ideas?
Comments
Post a Comment