This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Determine if tall array data is of specified class


tf = isaUnderlying(X,cl)



tf = isaUnderlying(X,cl) returns a tall array containing logical 1 (true) if the underlying data in tall array X is of class cl. Otherwise, the tall array contains logical 0 (false).


collapse all

All tall tables and arrays belong to the tall class. However, the underlying data type of a tall array can vary.

Create a datastore for the airlinesmall.csv data set. Select a subset of the variables to work with, and treat 'NA' values as missing data so that datastore replaces them with NaN values. Convert the datastore into a tall table.

varnames = {'Year', 'UniqueCarrier'};
ds = datastore('airlinesmall.csv','TreatAsMissing','NA',...
tt = tall(ds)
tt =

  Mx2 tall table

    Year    UniqueCarrier
    ____    _____________

    1987    'PS'         
    1987    'PS'         
    1987    'PS'         
    1987    'PS'         
    1987    'PS'         
    1987    'PS'         
    1987    'PS'         
    1987    'PS'         
    :       :
    :       :

Test whether the underlying data type of the first table variable Year is single.

tf = isaUnderlying(tt.Year,'single')
tf =

  tall logical


Determine the actual underlying data type of Year.

udt = classUnderlying(tt.Year)
udt =

  1x6 tall char array


Input Arguments

collapse all

Input array, specified as a tall array.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | table | cell | categorical | datetime | duration | calendarDuration

Underlying class, specified as a character vector specifying any valid MATLAB® class name.

Example: tf = isaUnderlying(X,'double')


Introduced in R2016b

Was this topic helpful?