This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

isaUnderlying

Determine if tall array data is of specified class

Syntax

tf = isaUnderlying(X,cl)

Description

example

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

Examples

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',...
    'SelectedVariableNames',varnames);
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

   0

Determine the actual underlying data type of Year.

udt = classUnderlying(tt.Year)
udt =

  1x6 tall char array

    'double'

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')

Tips

Extended Capabilities

Tall Arrays
Calculate with arrays that have more rows than fit in memory.

Introduced in R2016b