Number of classes

A practical tool for finding quickly the classes of a dataset based on the labels array.
463 Downloads
Updated 20 Jan 2010

View License

This program was developed to facilitate the analysis of datasets and the development of algorithms in the field of pattern classification. It is significantly faster than the relevant built-in function of Matlab (unique.m) plus it provides some basic details of the classes, such as the indexes of their members and their sizes.

Usage:
[q Q C N] = nc( O )
where O is the label array (vector)
q is the number of classes (integer)
Q is the class labels (vector)
C is the class members' indexes (cell)
N is the number of points in each class (int.)

Any feedback on this file, esp. regarding how it can be improved, would be greatly appreciated.

Cite As

Zacharias Voulgaris (2024). Number of classes (https://www.mathworks.com/matlabcentral/fileexchange/26435-number-of-classes), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0