I want to transform a upper triangular matrix to a vector without the diagonal elements. I do notice the solution given in this question. Map upper triangular matrix on vector skipping the diagonal .
But my problem is little different. I want to transform a 5*5 matrix to vector like:
x; a12; a13; a14; a15<br/>
x; x; a23; a24; a25<br/>
x; x; x; a34; a35<br/>
x; x; x; x; a45<br/
to
a12, a13, a14, a15, a23, a24, a25, a34, a35, a45
This means,<br/>
(i=1,j=2)->k=1; <br/>
(i=1,j=3)->k=2; <br/>
(i=1,j=4)->k=3; <br/>
(i=1,j=5)->k=4; <br/>
(i=2,j=3)->k=5; <br/>
(i=2,j=4)->k=6; <br/>
(i=2,j=5)->k=7; <br/>
(i=3,j=4)->k=8; <br/>
(i=3,j=5)->k=9; <br/>
(i=4,j=5)->k=10; <br/>
How can i get this relation f(i,j,N=5)=k? and how can i get the inverse function (i,j)=g(k,N) ?
Thank you!