[SOLVED] matrix manipulation

hi everyone,

I have a vector u=(x y z) and I would like to transform it (by some linear manipulations) into the following matrix:

(x 0 0)

(0 y 0)

(0 0 z)

in matlab notation: [x 0 0; 0 y 0; 0 0 z]

Concretely I would like to find some matrices A and B, for example, such that:

[x 0 0; 0 y 0; 0 z 0]=A*[x y z]*B

I know that there exists the function diag() in matlab but I would like to use some linear relations to build such a matrix.

Is there somebody that could help me?

Thank you very much

JC