Main Content

La traducción de esta página está obsoleta. Haga clic aquí para ver la última versión en inglés.

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
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 whether input is table
istimetableDetermine if input is timetable
is*Detect state
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
isUnderlyingTypeDetermine whether input has specified underlying data type
validateattributesCheck validity of array

Temas

Fundamental MATLAB Classes

There are many different data types, or classes, that you can work with in MATLAB. You can build matrices and arrays of floating-point and integer data, characters and strings, logical true and false values, and so on. Function handles connect your code with any MATLAB function regardless of the current scope. Tables, timetables, structures, and cell arrays provide a way to store dissimilar types of data in the same container.