Library: | multi |
See also: | diag |
Macro: | diagrv | |
Description: | replaces the diagonal of x by v |
Usage: | y = diagrv(x,v) | |
Input: | ||
x | N x K matrix | |
v | nk x 1 vector, where nk is min(N,K) | |
Output: | ||
y | N x K matrix |
library("multi") diagrv(eye(2),5|5)
Contents of y [1,] 5 0 [2,] 0 5
Library: | multi |
See also: | diag |