2
$\begingroup$

Is it possible to have a general expression for the binary sequence ?

Eg.

for N= 3, and i=0, M_i = diag(0,0,0) i=1, M_i = diag(0,0,1) . . i=7, M_i = diag(1,1,1)

I need a general matrix (M_i) or expression whose arguments are N,i.

P.S: I am not looking for a software code to generate this.

1 Answers 1

1

It is not clear what you want your matrices to look like. If you just put the binary expansion of $i$ down the diagonal, you can use the usual approach of extracting the binary bits. So your example would have $i \pmod 2$ in the lower right, $i/2 \pmod 2$ in the center, $i/4 \pmod 2$ in the upper left, where all divisions are floor divisions.