Skip to content
Prev 280314 / 398506 Next

Data Manipulation - make diagonal matrix of each element of a matrix

I'm sorry, the indices of my X matrix are wrong.
It should be:

 X =     x11      0      0     x12      0      0
              0   x11      0        0   x12      0
              0      0   x11        0      0   x12
           x21      0      0     x22      0      0
              0   x21      0        0   x22      0
              0      0   x21        0      0   x22
                       ...
           xn1      0      0     x52      0      0
              0   xn1      0        0   x52      0
              0      0   xn1        0      0   x52

or

 X =     -0.63        0          0    -0.82         0         0
              0   -0.630          0         0    -0.82         0
              0          0   -0.630         0          0   -0.82
           0.18        0          0     0.49          0         0
              0     0.18          0         0      0.49         0
              0         0      0.18         0          0     0.49
                       ...
            0.33      0          0    -0.31          0          0
              0    0.33          0          0    -0.31          0
              0        0      0.33          0         0     -0.31

Sorry for the confusion.
Tina








On Thu, Dec 15, 2011 at 10:02 AM, Clemontina Alexander
<ckalexa2 at ncsu.edu> wrote: