Data Types

Numeric arrays, characters and strings, tables, structures, and cell arrays; data type conversion

By default, MATLAB® stores all numeric variables as double-precision floating-point values. Additional data types store text, integer or single-precision values, or a combination of related data in a single variable. For more information, see Fundamental MATLAB Classes or watch Introducing MATLAB Fundamental Classes (Data Types).

  • Numeric Types
    Integer and floating-point data
  • Characters and Strings
    Text in character arrays and string arrays
  • Dates and Time
    Arrays of date and time values that can be displayed in different formats
  • Categorical Arrays
    Arrays of qualitative data with values from a finite set of discrete, nonnumeric data
  • Tables
    Arrays in tabular form whose named columns can have different types
  • Timetables
    Time-stamped data in tabular form
  • Structures
    Arrays with named fields that can contain data of varying types and sizes
  • Cell Arrays
    Arrays that can contain data of varying types and sizes
  • Function Handles
    Variables that allow you to invoke a function indirectly
  • Map Containers
    Objects with keys that index to values, where keys need not be integers
  • Time Series
    Data vectors sampled over time
  • Data Type Identification
    Determine data type of a variable
  • Data Type Conversion
    Convert between numeric arrays, strings and character arrays, dates and times, cell arrays, structures, or tables