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: Binning, Grids and Sequences
See also: aseq conv distance grid mseq

Function: bindata
Description: Bins a p-dimensional data set x, starting from the origin orig in steps of d.

Usage: {xb, yb} = bindata (x, d, orig {,y})
Input:
x m x n x d1 x ... x dn array
d n x 1 x d1 x ... x dn array
orig n x 1 x d1 x ... x dn array
y m x p x d1 x ... x dn array
Output:
xb l x n x d1 x ... x dn array, the indices of the bins into which the
yb l x (p+1) x d1 x ... x dn array

Note:

Example:
library("xplore")
x=aseq(0,10,0.1)
y=aseq(2,10,0.2)
z=x~y
d=#(0.4,0.8)
org=#(0.05,1.95)
bindata(z,d,org)

Result:
Contents of bindata.xb

[ 1,]       -1        0
[ 2,]        0        0
[ 3,]        0        0
[ 4,]        0        0
[ 5,]        0        1
[ 6,]        1        1
[ 7,]        1        1
[ 8,]        1        1
[ 9,]        1        2
[10,]        2        2
 Contents of bindata.yb

[ 1,]        1
[ 2,]        3
[ 3,]        0
[ 4,]        0
[ 5,]        1
[ 6,]        3
[ 7,]        0
[ 8,]        0
[ 9,]        1



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