How to read this matrix notation Excuse me for this basic question, but when reading some mathematic books I have encountered the following matrix:
W = 2diag([1 1 0,01])

Could anybody explain to me how can I read this? Is it just a diagonal matrix multiplied by 2?
 A: My guess would be $\texttt{2diag([1 1 0,01])}=\begin{bmatrix}2 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 0,02  \end{bmatrix}.$
A: The most reliable way could be to ask your lecturer, otherwise there could be a missing or extra multiplication by $2$.
The line  
W = 2diag([1 1 0,01])

in the question has been typeset as it could be a code from the program. It is not clear whether this is deliberate or occasional, and whether this is exactly how it looks like in the thesis. Moreover, []-brackets inside ()-brackets strengthen the conjecture that it could be a code from the program. It seems quite viable that the program has a function 2diag (using a naming convention to put 2 instead of to) that takes a list (cf. [...] syntax) and creates a corresponding diagonal matrix of an appropriate dimension. This way, 2diag([1 1 0,01]) will create $3x3$ matrix with $1$, $1$ and $0,01$ on its main diagonal. However, if this notation actually means $$2\,\times\,\text{diag}\{1,1,0.01\}$$ then the diagonal of the resulting matrix will be $2$, $2$ and $0,02$. That's why one should be careful.
