>> b=[2 4 8 16 32 64 128]
b =
2 4 8 16 32 64 128
>> b=diag(b)
b =
2 0 0 0 0 0 0
0 4 0 0 0 0 0
0 0 8 0 0 0 0
0 0 0 16 0 0 0
0 0 0 0 32 0 0
0 0 0 0 0 64 0
0 0 0 0 0 0 128