There are many different data types, or classes,
that you can work with in the MATLAB^{®} software. You can build
matrices and arrays of floatingpoint and integer data, characters
and strings, and logical true
and false
states.
Function handles connect your code with any MATLAB function regardless
of the current scope. Tables, structures, and cell arrays provide
a way to store dissimilar types of data in the same container.
There are 16 fundamental classes in MATLAB. Each of these classes is in the form of a matrix or array. With the exception of function handles, this matrix or array is a minimum of 0by0 in size and can grow to an ndimensional array of any size. A function handle is always scalar (1by1).
All of the fundamental MATLAB classes are shown in the diagram below:
Numeric classes in the MATLAB software include signed and unsigned integers, and single and doubleprecision floatingpoint numbers. By default, MATLAB stores all numeric values as doubleprecision floating point. (You cannot change the default type and precision.) You can choose to store any number, or array of numbers, as integers or as singleprecision. Integer and singleprecision arrays offer more memoryefficient storage than doubleprecision.
All numeric types support basic array operations, such as subscripting, reshaping, and mathematical operations.
You can create twodimensional double
and logical
matrices
using one of two storage formats: full
or sparse
. For matrices with mostly zerovalued
elements, a sparse matrix requires a fraction of the storage space
required for an equivalent full matrix. Sparse matrices invoke methods
especially tailored to solve sparse problems
These classes require different amounts of storage, the smallest
being a logical
value or 8bit integer which requires
only 1 byte. It is important to keep this minimum size in mind if
you work on data in files that were written using a precision smaller
than 8 bits.
The following table describes the fundamental classes in more detail.
Class Name  Documentation  Intended Use 

double , single  FloatingPoint Numbers  
int8 , uint8 , int16 , uint16 , int32 , uint32 , int64 , uint64  Integers 

char  Characters and Strings 

logical  Logical Operations  
function_handle  Function Handles 

table  Tables 

struct  Structures 

cell  Cell Arrays 
