| 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 | |
; 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
decompose a color vector and show the results
| Library: | graphic |
| See also: | transform |