Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: multi
See also: diag

Quantlet: 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

Example:

library("multi")

diagrv(eye(2),5|5)

Result:

Contents of y 

[1,]   5   0    

[2,]   0   5    


Library: multi
See also: diag

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Christian Hafner, Sperlich 971023
(C) MD*TECH Method and Data Technologies, 21.9.2000