Main Content

Identification des types de données

Déterminer le type de données d’une variable

MATLAB® propose de nombreuses fonctions permettant d’identifier le type de données d’une variable ou de déterminer si une variable est d’un type de données spécifique. Utilisez ces fonctions lorsque vous appelez ou écrivez du code qui nécessite que les variables soient d’un type de données spécifique.


développer tout

isfloatDetermine if input is floating-point array
isintegerDetermine whether input is integer array
islogicalDetermine if input is logical array
isnumericDetermine whether input is numeric array
isrealDetermine whether array uses complex storage
issparseDetermine whether input is sparse
isstringDetermine if input is string array
ischarDetermine if input is character array
iscellstrDetermine if input is cell array of character vectors
isdatetimeDetermine if input is datetime array
isdurationDetermine if input is duration array
iscalendardurationDetermine if input is calendar duration array
iscellDetermine if input is cell array
isstructDetermine if input is structure array
istableDetermine if input is table
istimetableDetermine if input is timetable
istabularDetermine if input is table or timetable (depuis R2021b)
isaDetermine if input has specified data type
iscategoricalDetermine whether input is categorical array
isenumDetermine if variable is enumeration
isgraphicsTrue for valid graphics object handles
isjavaDetermine if input is Java object
isobjectDetermine if input is MATLAB object
whosList variables in workspace, with sizes and types
classClass of object
underlyingTypeType of underlying data determining array behavior (depuis R2020b)
isUnderlyingTypeDetermine whether input has specified underlying data type (depuis R2020b)
validateattributesCheck validity of array


  • Fundamental MATLAB Classes

    You can work with many different data types, or classes, in MATLAB, including single- and double-precision numbers, signed and unsigned integers, strings, logical values, tables, function handles, and more. Deciding which class to use depends on your intended usage and memory storage requirements.

  • Use is* Functions to Detect State

    There are many functions in MATLAB that detect if an input has a specified data type or a specified state, or if the elements of an input array meet a specified condition.

  • Working with Objects in MATLAB

    Some MATLAB functions return objects. Objects combine data with functions and methods.