There are many different data types, or classes, that youcan work with in the MATLAB® software. You can build matrices and arrays of floating-point andinteger data, characters and strings, and logicalfalse states. Function handles connect your code with anyMATLAB function regardless of the current scope. Tables, structures, and cellarrays 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 0-by-0 in size and can grow to an n-dimensional array of any size. A function handle is always scalar (1-by-1). 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 double-precision floating-point numbers. By default, MATLAB stores all numeric values as double-precision 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 single-precision. Integer and single-precision arrays offer more memory-efficient storage than double-precision. All numeric types support basic array operations, such as subscripting, reshaping, and mathematical operations. You can create two-dimensionallogical matrices using one of two storage formats:sparse. For matrices with mostly zero-valued elements, a sparsematrix requires a fraction of the storage space required for an equivalent fullmatrix. Sparse matrices invoke methods especially tailored to solve sparseThese classes require different amounts of storage, the smallest being alogical value or 8-bit integer which requires only 1 byte. Itis important to keep this minimum size in mind if you work on data in files thatwere written using a precision smaller than 8 bits. The following table describes the fundamental classes in more detail. |Characters and Strings|