Documentation

classUnderlying

Class of underlying data in tall array

Syntax

C = classUnderlying(X)

Description

example

C= classUnderlying(X)returns the class of the data stored inside tall arrayX.

Examples

collapse all

All tall tables and arrays belong to thetallclass. However, theunderlying数据type of a tall array can vary.

Create a datastore for theairlinesmall.csv数据set. Select a subset of the variables to work with, and treat'NA'values as missing data so that数据storereplaces them withNaNvalues. Convert the datastore into a tall table.

varnames = {“年”,'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' : : : :

Determine the class of the tall tablettand the first table variableYear.

class(tt)
ans = 'tall'
class(tt.Year)
ans = 'tall'

Determine the underlying data types oftt, as well as theYearandUniqueCarriertable variables.

classUnderlying(tt)
ans = 1x5 tall char array 'table'
classUnderlying(tt.Year)
ans = 1x6 tall char array 'double'
classUnderlying(tt.UniqueCarrier)
ans = 1x4 tall char array 'cell'

In some cases, the result returned byclassUnderlyingis an unevaluated tall array. Unevaluated tall arrays can be evaluated using thegatherfunction to bring the result into memory.

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

Output Arguments

collapse all

Underlying class, returned as a tall array.

Tips

  • UseisaUnderlyingto test whether a tall array has a particular underlying data type.

Introduced in R2016b

Was this topic helpful?