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?
My guess would be $\texttt{2diag([1 1 0,01])}=\begin{bmatrix}2 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 0,02 \end{bmatrix}.$
\texttt didn't work on the computer where I submitted the edit, but on the computer I'm on now, it does work. I guess some sort of MathJax caching issue is at fault? Anyway probably the best solution is for someone to roll back my edit. (I can't)
– David Z
Jul 03 '14 at 18:26
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.
2a would be equivalent to 2*a.
– Ruslan
Jul 03 '14 at 18:30
_ and @, and must contain at least one non-digit, but the position of that is not specified; thus, 100x is a valid identifier in GAP - see here
– Olexandr Konovalov
Jul 03 '14 at 21:34
,instead of., it's sick :(. – TheMP Jul 03 '14 at 15:02