Main Content

Identificación de tipos de datos

Determine los tipos de datos de una variable

MATLAB® tiene muchas funciones para identificar el tipo de datos de una variable o para determinar si una variable tiene un tipo de datos específico. Utilice estas funciones al llamar o escribir código que dependa de variables que tengan tipos de datos específicos.

Funciones

expandir todo

isfloatDetermine if input is floating-point array
isintegerDetermine whether input is integer array
islogicalDeterminar si una entrada es un arreglo lógico
isnumericDetermine whether input is numeric array
isrealDetermine whether array uses complex storage
issparseDetermine whether input is sparse
isstringDeterminar si una entrada es un arreglo de cadenas
ischarDeterminar si una entrada es un arreglo de caracteres
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
iscellDeterminar si una entrada es un arreglo de celdas
isstructDeterminar si una entrada es un arreglo de estructuras
istableDetermine if input is table
istimetableDetermine if input is timetable
istabularDetermine if input is table or timetable (desde 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 (desde R2020b)
isUnderlyingTypeDetermine whether input has specified underlying data type (desde R2020b)
validateattributesCheck validity of array

Temas

  • Clases fundamentales de MATLAB

    Hay muchos tipos distintos de datos o clases con los que puede trabajar en MATLAB. Puede crear matrices y arreglos de datos de enteros y de punto flotante, caracteres y cadenas, valores lógicos true y false, etc. Los identificadores de funciones conectan su código con cualquier función de MATLAB, independientemente del ámbito de aplicación actual. Las tablas, los horarios, las estructuras y los arreglos de celdas son formas de almacenar distintos tipos de datos en el mismo contenedor.

  • 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.