Statistics Toolbox    
dummyvar

Matrix of 0-1 "dummy" variables

Syntax

Description

D = dummyvar(group) generates a matrix, D, of 0-1 columns. D has one column for each unique value in each column of the matrix group. Each column of group contains positive integers that indicate the group membership of an individual row.

Example

Suppose we are studying the effects of two machines and three operators on a process. The first column of group would have the values 1 or 2 depending on which machine was used. The second column of group would have the values 1, 2, or 3 depending on which operator ran the machine.

See Also
pinv, regress


  disttool ecdf