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: [] index matrix

Function: paf
Description: paf selects rows of an object depending on a given vector. All elements of the first argument are taken if the corresponding vector element is unequal to 0. Otherwise they are dropped.

Usage: z = paf (x, ind)
Input:
x d1 x ... x dn array
ind d1 x 1 vector
Output:
z k x d2 x ... x dn array where k=sum_i ind_i

Example:
randomize(0)
x=uniform(10)
paf(x, x>0.5)

Result:
Contents of paf



[1,] 0.60488

[2,] 0.61585



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