How to create diagonal and unequal matrix in R? -


i need create diagonal (6,6) matrix in r using valuse 1.2, 12.1, 6.5, 9.4, 4.9, 2.4. how should r code?

use diag:

diag(c(1.2, 12.1, 6.5, 9.4, 4.9, 2.4)) 

Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

python - ValueError: could not convert string to float -

php - Laravel Get all child node count with condition -