Consider having vector
$$v = \begin{pmatrix} v_1\\ v_2\\ \vdots\\ v_n \end{pmatrix}$$
Consider the final result:
$$ V = \begin{pmatrix} v_1 & 0 & \dots & 0\\ 0 & v_2 & \dots & 0\\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \dots & v_n\\ \end{pmatrix} $$
How to get matrix $V$ operating on $v$ with matricial operations?
Thanks