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

Group: Matrix Manipulation
Topic: General Commands
See also: mix paf sort

Function: index
Description: index generates a new matrix z from an old matrix x by extracting the rows of x indicated in the index vector i.

Usage: y = index (x, ind)
Input:
x n x p matrix
ind k dimensional vector
Output:
y k x p matrix

Note:

Example:

x = #(0.1, 0.2, 0.3, 0.4)
i = #(4, 3, 2, 2, 1)
( index (x, i) )'
Result:

Contents of _tmp
[1,]   0.4   0.3   0.2   0.2   0.1 

Group: Matrix Manipulation
Topic: General Commands
See also: mix paf sort

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

(C) MD*TECH Method and Data Technologies, 28.6.1999