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: graphic
See also: transform

Quantlet: groupcol
Description: Decomposes a (color) vector into single groups.

Usage: {g, gind} = groupcol (col, ncol)
Input:
col scalar or color vector
ncol scalar expected length of colorvector
Output:
gcol m x 1 different colors
gind n x 1 index of groups

Example:

; loads the library graphic

library ("graphic")

; generate a color vector, e.g. for swiss banknote

col = matrix(100)|(4*matrix(100))

; computes the different colors

{gcol, gind} = groupcol (col, 200)

; show the different colors

gcol

; show the index vector (100 ones and 100 twos)

gind

Result:

decompose a color vector and show the results


Library: graphic
See also: transform

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: Sigbert Klinke, 970201
(C) MD*TECH Method and Data Technologies, 21.9.2000