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: xclust
See also: mat2vec distance lpdist agglom corrdist

Quantlet: vec2mat
Description: stores the values of a vector into the upper triangle of a symmetric matrix regarding the sequence described in agglom

Usage: d = vec2mat(v)
Input:
v n(n-1)/2 x 1 matrix containing the values of the upper triangle of a symmetric matrix
Output:
d n x n symmetric matrix with zeros in the diagonal

Example:

; load the library xclust

library ("xclust")

; generate vector

v = #(2, 3, 7, 1, 8, 5)

; apply vec2mat

vec2mat(v)

Result:

Content of object d

[1,]        0        2        3        7 

[2,]        2        0        1        8 

[3,]        3        1        0        5 

[4,]        7        8        5        0 


Library: xclust
See also: mat2vec distance lpdist agglom corrdist

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: Hans-Joachim Mucha, 950121 Sigbert Klinke, 970902
(C) MD*TECH Method and Data Technologies, 21.9.2000