Page 1 of 1

problem in dealing with matrix

Posted: Sat Apr 20, 2002 5:19 pm
by sanall
I have difficulties in dealing with some matrixes.The problem are :
1.I have a n*n matrix marked as A,and A follows the regularity:if I input n=3,the A should be:
1 0 0
2 6 0
3 4 5 ,
when n=4,A should be:
1
2  9
3 10  8
4  5   6  7,
and when n=5,A=
1
2 12
3 13 11
4 14 15 10
5  6   7   8   9,......(zeros are ignored)It goes on.

And I want to get result after convertion as the A(if n=5)
should be:
1  12  11   10  9
0    2  13   15  8
0    0   3    14  7
0    0    0    4   6
0    0    0     0  5.
Could someone help me solve the porblem?  
???