Diagonal matrix from a vector
Creates a diagonal matrix from a vector
diagonal(d)
d |
A numerical vector |
A diagonal matrix wirh the values of vector in the diagonal a zeros elsewhere
Jose Luis Vicente Villardon
diag(c(1, 2, 3, 4, 5))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.