I want to get the matrix as Figure 2. There should be two ways to achieve the result.
There is a matrix as Figure 1, and change it to the form of Figure 2.
Generating the matrix as Figure 2 directly.
How can I do it? Thanks.
Note：The matrix in Figure 2 is a symmetric matrix