Statistics Toolbox    
classify

Linear discriminant analysis.

Syntax

Description

class = classify(sample,training,group) assigns each row of the data in sample to one of the groups into which the training set, training, is already divided. sample and training must have the same number of columns.

The vector group contains integers, from one to the number of groups, that identify the group to which each row of the training set belongs. group and training must have the same number of rows.

The function returns class, a vector with the same number of rows as sample. Each element of class identifies the group to which the corresponding element of sample has been assigned. The classify function determines the group into which each row in sample is classified by computing the Mahalanobis distance between each row in sample and each row in training.

Example

See Also
mahal


 chi2stat cluster