output = classes2boolean(classes, no_different) classes: Zero-based class vector. It may be a column or row vector, doesn't matter. output: matrix described below. Converts classes into a boolean matrix where each column correspond to one class. It will contain a one in column j if the i-th row belongs to the j-th class or zero otherwhise.